Author: mesmerize | Posted on: 9/25/2008 3:36:21 AM | Views : 1006

 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

...

Go to the complete details ...