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.
if (idd == null)
{
idd = 0;
}
bt.id = idd + 1;
Here dt is dataclass and bankdetails is table name.
Nodeid | Parentid | Client_id | nodetype | Folder_Name |
1 | 1 | 2 | Folder | A |
2 | 1 | 2 | Folder | B |
3 | 1 | 2 | Folder | C |
4 | 2 | 2 | Folder | D |
5 | 2 | 2 | Folder | E |
6 | 3 | 2 | Folder | F |
7 | 3 | 2 | File | G |
8 | 4 | 2 | Folder | H |
9 | 4 | 2 | Folder | I |
10 | 3 | 2 | Folder | J |
11 | 3 | 2 | Folder | K |
12 | 5 | 2 | Folder | L |
13 | 8 | 2 | Folder | M |
14 | 9 | 2 | Folder | N |
15 | 10 | 2 | Folder | O |