Do that like this
db.Users.OrderByDescending(u => u.UserId).FirstOrDefault();
I am providing latest Interview Questions with Answers. Candidate has prepared their interview and get job. Mobile: 8920128728
You can use IDENT_CURRENT to look up the last identity value to be inserted, e.g. IDENT_CURRENT( 'MyTable' ) However, be caut...
No comments:
Post a Comment