public IList <Timeslot> GetTimeslots(int eventId) { using (var db = new CC.Data.CCDB()) { var e = db.Events.Find(eventId); if (e == null) { throw new ArgumentException("Event not found"); } List <Timeslot> result = new List <Timeslot>(); foreach (var Timeslot in e.Timeslots) { result.Add(Timeslot.Map()); } return(result); } }