public async Task <Model.Calender> GetCalenderWithIncludes(Model.Hold hold) { var calender = await context.Calenders.Where(x => x.Hold.Contains(hold)).Include(x => x.Timeslots).ThenInclude(x => x.Booking).ThenInclude(x => x.Student).Include(x => x.Timeslots).ThenInclude(x => x.Teacher).Include(x => x.Hold).AsNoTracking().FirstOrDefaultAsync(); return(calender); }
public async Task <Model.Calender> Get(Model.Hold hold) { return(await calenderQuery.GetCalenderWithIncludes(hold)); }