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