Ejemplo n.º 1
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 {
     return(new Response()
     {
         Customers = await _context.Customers.Select(x => CustomerApiModel.FromCustomer(x)).ToListAsync()
     });
 }
Ejemplo n.º 2
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 {
     return(new Response()
     {
         Customer = CustomerApiModel.FromCustomer(await _context.Customers.FindAsync(request.Id))
     });
 }