예제 #1
0
        public async Task <ActionResult <ICollection <SessionResponse> > > GetByConference(int conferenceId, DateTimeOffset?fromDate = null,
                                                                                           DateTimeOffset?toDate = null)
        {
            fromDate = fromDate ?? DateTimeOffset.MinValue;
            toDate   = toDate ?? DateTimeOffset.MaxValue;

            return((await _sessionsRepository.GetByConferenceIdAsync(conferenceId))
                   .Where(s => IsSessionWithinDateRange(fromDate, toDate, s))
                   .Select(m => m.MapSessionResponse())
                   .ToList());
        }