Пример #1
0
 public CustomersController(IGetCustomerListQuery customerContext, IGetCustomerDetailQuery customerDetailContext,
                            ICreateCustomerCommand customerCreateContext, IUpdateCustomerCommand customerUpdateContext, IDeleteCustomerCommand customerDeleteContext)
 {
     _customerContext       = customerContext;
     _customerDetailContext = customerDetailContext;
     _customerCreateContext = customerCreateContext;
     _customerUpdateContext = customerUpdateContext;
     _customerDeleteContext = customerDeleteContext;
 }
 public CreateMaintenanceBookingCommand(IDatabaseService database,
                                        IMaintenanceBookingFactory factory,
                                        ICreateCustomerCommand customerCommand,
                                        ICreateVehicleCommand vehicleCommand)
 {
     _database        = database;
     _factory         = factory;
     _customerCommand = customerCommand;
     _vehicleCommand  = vehicleCommand;
 }
Пример #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;
 }
 public CustomersController(ICreateCustomerCommand createCustomerCommand, IChaufferDbContext context)
 {
     this.context = context;
     this.createCustomerCommand = createCustomerCommand;
 }
 public CreateCustomerUseCase(ICreateCustomerCommand command, IUnitOfWork unitOfWork, IImportCustomersQuery query)
 {
     _query      = query;
     _command    = command;
     _unitOfWork = unitOfWork;
 }
Пример #7
0
 public CustomersController(IGetCustomersQuery query,
                            ICreateCustomerCommand command)
 {
     _command = command;
     _query   = query;
 }
Пример #8
0
 public IActionResult Post([FromBody] CustomerDto dto,
                           [FromServices] ICreateCustomerCommand command)
 {
     executor.ExecuteCommand(command, dto);
     return(Ok(new { StatusCode = HttpStatusCode.OK, Message = "New Customer Created" }));
 }