Software Engg,sql server 2005 | Software developer-Kshms
Saturday, August 6, 2011
Max Id of table find out by linq
Var idd = dt.bankdetails.Max(s => s.id);
if (idd == null)
{
idd = 0;
}
bt.id = idd + 1;
Here
dt
is dataclass and
bankdetails
is table name.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment