Beispiel #1
0
 public async Task <GetEpicByIdResponse> Handle(GetEpicByIdRequest request)
 {
     return(new GetEpicByIdResponse()
     {
         Epic = EpicApiModel.FromEpic(await _context.Epics
                                      .Include(x => x.Stories)
                                      .Include(x => x.Product)
                                      .SingleAsync(x => x.Id == request.Id))
     });
 }
Beispiel #2
0
            public async Task <GetEpicsResponse> Handle(GetEpicsRequest request)
            {
                var epics = await _context.Epics
                            .Include(x => x.Stories)
                            .Include(x => x.Product)
                            .Where(x => x.TenantId == request.TenantId)
                            .ToListAsync();

                return(new GetEpicsResponse()
                {
                    Epics = epics.Select(x => EpicApiModel.FromEpic(x)).ToList()
                });
            }