public async Task <Response> Handle(Request request)
 {
     return(new Response()
     {
         Day = DayApiModel.FromDay(await _context.Days
                                   .Include(x => x.Tenant)
                                   .SingleAsync(x => x.Id == request.Id && x.Tenant.UniqueId == request.TenantUniqueId))
     });
 }
Beispiel #2
0
            public async Task <Response> Handle(Request request)
            {
                var days = await _context.Days
                           .Include(x => x.Tenant)
                           .Where(x => x.Tenant.UniqueId == request.TenantUniqueId)
                           .ToListAsync();

                return(new Response()
                {
                    Days = days.Select(x => DayApiModel.FromDay(x)).ToList()
                });
            }