I have a Column with DataType as Nvarchar(max) Sample Records:
Advisor_Code
9001
9002
9003
100001
100001
9011
I have tried this Query :
var code = (from a in db.advisor_Registration select a ).Max(a=>a.advisor_Code);
It Returns 9011 but max Number is 100001 . How to fix it
See Question&Answers more detail:os