Ejemplo n.º 1
0
 public CustomersService(
     IGetCustomersQuery getCustomersQuery,
     IAddCustomerCommand addCustomerCommand)
 {
     _getCustomersQuery  = getCustomersQuery;
     _addCustomerCommand = addCustomerCommand;
 }
Ejemplo n.º 2
0
 public CustomersController(IGetCustomersQuery query,
                            ICreateCustomerCommand command)
 {
     _command = command;
     _query   = query;
 }
Ejemplo n.º 3
0
 public IActionResult Get(
     [FromQuery] CustomerSearch search,
     [FromServices] IGetCustomersQuery query)
 {
     return(Ok(executor.ExecuteQuery(query, search)));
 }