コード例 #1
0
 public Task <ExaminationResponse[]> GetAsync(ExaminationFilterModel filterModel)
 => GetNotDeleted()
 .Where(examination => examination.Name.ToUpper().Contains(filterModel.ExaminationTitle.ToUpper()))
 .Where(examination => filterModel.StartDate.HasValue ? examination.CreationTime.Date >= filterModel.StartDate.Value : examination.CreationTime.Date >= DateTime.MinValue)
 .Where(examination => filterModel.EndDate.HasValue ? examination.CreationTime.Date <= filterModel.EndDate.Value : examination.CreationTime.Date <= DateTime.MaxValue)
 .Include(examination => examination.Author)
 .ThenInclude(author => author.Claims)
 .ProjectTo <ExaminationResponse>(mapper.ConfigurationProvider)
 .ToArrayAsync();
コード例 #2
0
 public async Task <ExaminationResponse[]> GetFilteredExaminations([FromBody] ExaminationFilterModel filter)
 => await examinationsRepository.GetAsync(filter);