2

I am not use virtual navigation property

I want manually specify fields to load

IQueryable<ScheduleModel> q = _db.Schedules;
q = q.Include(x => x.ElementItem); <-- load ElementItem
q = q.Include(x => x.ScheduleHours); <-- load collection

But EF7 load (or assign) ScheduleHours[0..x].ElementItem because ElementItem with same Id loaded in first Include()

After serialization in Json I have big model.

How disable auto loading not specified fields?

Alexandr Sulimov
  • 1,894
  • 2
  • 24
  • 48

0 Answers0