public CustomersController(IGetCustomersCommand getCustomerss, IGetSingleCustomerCommand getSingleCustomer, IInsertCustomerCommand insertCustomer, IUpdateCustomerCommand updateCustomer, IDeleteCustomerCommand deleteCustomer) { _getCustomers = getCustomerss; _getSingleCustomer = getSingleCustomer; _insertCustomer = insertCustomer; _updateCustomer = updateCustomer; _deleteCustomer = deleteCustomer; }
public CustomersController(IGetCustomerListQuery customerContext, IGetCustomerDetailQuery customerDetailContext, ICreateCustomerCommand customerCreateContext, IUpdateCustomerCommand customerUpdateContext, IDeleteCustomerCommand customerDeleteContext) { _customerContext = customerContext; _customerDetailContext = customerDetailContext; _customerCreateContext = customerCreateContext; _customerUpdateContext = customerUpdateContext; _customerDeleteContext = customerDeleteContext; }
public CustomersController( IGetCustomerListQuery getCustomerListQuery, IGetCustomerDetailQuery getCustomerDetailQuery, ICreateCustomerCommand createCustomerCommand, IUpdateCustomerCommand updateCustomerCommand, IDeleteCustomerCommand deleteCustomerCommand) { _getCustomerListQuery = getCustomerListQuery; _getCustomerDetailQuery = getCustomerDetailQuery; _createCustomerCommand = createCustomerCommand; _updateCustomerCommand = updateCustomerCommand; _deleteCustomerCommand = deleteCustomerCommand; }
public IActionResult Put([FromBody] CustomerDto dto, [FromServices] IUpdateCustomerCommand command) { executor.ExecuteCommand(command, dto); return(Ok(new { StatusCode = HttpStatusCode.OK, Message = "Customer updated" })); }