In web api the data without using .ToList()
is also send to api, but how?
This is my LINQ query and I do not use the .ToList()
but my data is also sent to the browser.can anyone please tell me the difference or can describe that how it is working?
using (var _context = new iCMEFModelCon())
{
return _context.UserResidents.Where(c => c.ResidentId == residentId)
.Select(c => new
{
UserId = c.User.Id,
UserName = ((c.User.FirstName ?? "") + " " + (c.User.LastName ?? "")).Trim()
});
}