コード例 #1
0
        public async Task <List <VideoHearing> > Handle(GetHearingsByGroupIdQuery query)
        {
            var videoHearing = VideoHearings.Get(_context);

            return(await videoHearing.Where(x => x.SourceId == query.GroupId)
                   .OrderBy(x => x.ScheduledDateTime)
                   .ToListAsync());
        }
コード例 #2
0
        public async Task <List <VideoHearing> > Handle(GetHearingsByUsernameQuery query)
        {
            var username     = query.Username.ToLower().Trim();
            var videoHearing = VideoHearings.Get(_context);

            return(await videoHearing
                   .Where(x => x.Participants.Any(p => p.Person.Username.ToLower().Trim() == username))
                   .ToListAsync());
        }