I do the following query with linq, but I can not get that id that I retrieve in the query.
var seccionGrado = (from sg in _context.SeccionGrado
where sg.IdSeccion == user.IdSeccion
&& sg.IdGrado == user.IdGrado
select new
{
id = sg.IdSeccionGrado
}).ToList();
var s = Convert.ToInt32(seccionGrado[0]);