get last id ef
Code Example - get last id ef
//Grab the highest value using the Max() method
int max = db.Products.Max(p => p.ID);
//Grab the highest value using the Max() method
int max = db.Products.Max(p => p.ID);