i am having this problem. i want to get the maximum value of a column's record in my database but when i use this code, it gives me an error. saying
"The null value cannot be assigned to a member with type System.Int16 which is a non-nullable value type. ".
How can i solve this problem? i dont want to use sql to get it.
This is the code i wrote to get the maximum ID from the Oracleorganization database,
int x = synergy.OracleOrganizatations.Max(c=> c.OracleOrganizationID);
help needed urgently.
Thanks
Kingsley
Mark As Answer If this answer solves ur problem.
Thanks
Kingsley