Esempio n. 1
0
 public static Conference GetByName(this ConferenceContext context, string name) =>
 context.Conferences
 .Include(c => c.Sessions)
 .ThenInclude(s => s.Attendees)
 .FirstOrDefault(c => c.Name == name);
Esempio n. 2
0
 public static IQueryable <Conference> GetAllConferences(this ConferenceContext context) =>
 context.Conferences
 .Include(c => c.Sessions)
 .ThenInclude(s => s.Attendees);
Esempio n. 3
0
 public static bool ThereIsNoConferenceWithGivenName(this ConferenceContext context, string name) =>
 context.Conferences.Count(c => c.Name == name) == 0;
Esempio n. 4
0
 public static Conference GetById(this ConferenceContext context, int conferenceId) =>
 context.Conferences
 .Include(c => c.Sessions)
 .ThenInclude(s => s.Attendees)
 .FirstOrDefault(c => c.Id == conferenceId);