Пример #1
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 {
     return(new Response()
     {
         Service = ServiceApiModel.FromService(await _context.Services.FindAsync(request.Id))
     });
 }
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 {
     return(new Response()
     {
         Services = await _context.Services.Select(x => ServiceApiModel.FromService(x)).ToListAsync()
     });
 }