コード例 #1
0
        public async Task <ICollection <ReviewDTO> > GetAllReviewsByDateAsync(DateTime date)
        {
            businessValidator.IsDateValid(date);

            var result = await this.context.Reviews
                         .Where(bu => bu.CreatedOn == date)
                         .Where(co => co.isVisible == true)
                         .Include(bu => bu.BusinessUnit)
                         .OrderByDescending(co => co.CreatedOn)
                         .Select(r => r.ToDTO())
                         .ToListAsync();

            return(result);
        }