1
I have a controller where I make a Select
to get a list, but it returns empty.
public IEnumerable<Check> GetUserByNumberOfregistration(int numberOfregistrationUser)
{
CheckContext contextObj = new CheckContext();
var result = contextObj.hour
.Where(x => x.NumberOfregistrationUser == numberOfregistrationUser)
.Select(p => new Check()
{
Id = p.Id,
ArrivalTime = p.ArrivalTime,
DepartureTime = p.DepartureTime,
NumberOfregistrationUser = p.NumberOfregistrationUser
});
return result;
}
It’s hard to know why it has to be this code.
– novic
'((System.Data.Entity.Infrastructure.Dbquery<Appteste.Models.Check>)result). Sql' threw an Exception of type 'System.Notsupportedexception'
– user103979
@Gvr Managed to solve now?
– Jéf Bueno