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;
}