I'm trying to understand how linq queries are executed.
As I know IQueryable
queries are evaluated on server side together with filters and select and are executed only when ToList()
or First()
method is called.
However I'm having troubles understanding how the following query is evaluated. Is the "select new" evaluated on client side or on server side?
Is the Select(x=> new Note)
triggers eager loading ?
IQueryable<Note> query = db.Notes
.Where(x => Id == someId)
.Select(c => new Note
{
Title = x.Title
Id = x.NoteId,
});