“Obtenha o último id ef” Respostas de código

Obtenha o último id ef

//Grab the highest value using the Max() method
int max = db.Products.Max(p => p.ID);
Agreeable Armadillo

Obtenha o último id ef

//Grab the highest ID value using the OrderByDescending() method
var max = db.Products.OrderByDescending(p => p.ID).FirstOrDefault().ID;
Agreeable Armadillo

Respostas semelhantes a “Obtenha o último id ef”

Perguntas semelhantes a “Obtenha o último id ef”

Mais respostas relacionadas para “Obtenha o último id ef” em C#

Procure respostas de código populares por idioma

Procurar outros idiomas de código