Mark Tabor

Mark Tabor

  • 586
  • 2k
  • 464.3k

specific cast is not valid in c# mvc

Jan 17 2023 8:34 AM

I have a query 

var myquery=from nnn in db.Employees where nnn.empNo=EMPLOYEENO select nnn).FirstOrDefault();

EMPLOYEENO is parameter coming frm method, now in my Emplyees table there are few columns having null values so when this query executes it gives exception "SPECIFIC CAST IS NOT VALID" 

 


Answers (12)