public CustomersController(IGetCustomersCommand getCustomerss, IGetSingleCustomerCommand getSingleCustomer, IInsertCustomerCommand insertCustomer, IUpdateCustomerCommand updateCustomer, IDeleteCustomerCommand deleteCustomer)
 {
     _getCustomers      = getCustomerss;
     _getSingleCustomer = getSingleCustomer;
     _insertCustomer    = insertCustomer;
     _updateCustomer    = updateCustomer;
     _deleteCustomer    = deleteCustomer;
 }
Пример #2
0
 public CustomersController(IGetCustomerListQuery customerContext, IGetCustomerDetailQuery customerDetailContext,
                            ICreateCustomerCommand customerCreateContext, IUpdateCustomerCommand customerUpdateContext, IDeleteCustomerCommand customerDeleteContext)
 {
     _customerContext       = customerContext;
     _customerDetailContext = customerDetailContext;
     _customerCreateContext = customerCreateContext;
     _customerUpdateContext = customerUpdateContext;
     _customerDeleteContext = customerDeleteContext;
 }
Пример #3
0
 public CustomersController(
     IGetCustomerListQuery getCustomerListQuery,
     IGetCustomerDetailQuery getCustomerDetailQuery,
     ICreateCustomerCommand createCustomerCommand,
     IUpdateCustomerCommand updateCustomerCommand,
     IDeleteCustomerCommand deleteCustomerCommand)
 {
     _getCustomerListQuery   = getCustomerListQuery;
     _getCustomerDetailQuery = getCustomerDetailQuery;
     _createCustomerCommand  = createCustomerCommand;
     _updateCustomerCommand  = updateCustomerCommand;
     _deleteCustomerCommand  = deleteCustomerCommand;
 }
 public CustomersService(
     ILoggerAdapter <CustomersService> logger,
     IMapperAdapter mapperAdapter,
     ICustomerByIdQuery customerByIdQuery,
     IAllCustomersQuery allCustomersQuery,
     ICreateCustomerCommand createCustomerCommand,
     IDeleteCustomerCommand deleteCustomerCommand
     )
 {
     _logger                = logger;
     _mapperAdapter         = mapperAdapter;
     _customerByIdQuery     = customerByIdQuery;
     _getAllCustomersQuery  = allCustomersQuery;
     _createCustomerCommand = createCustomerCommand;
     _deleteCustomerCommand = deleteCustomerCommand;
 }
Пример #5
0
 public IActionResult Delete(int id, [FromServices] IDeleteCustomerCommand command)
 {
     executor.ExecuteCommand(command, id);
     return(NoContent());
 }