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