Example #1
0
 public OrdersController(IGetShippersCommand getShippers, ICreateOrderCommand createOrder, IGetOrdersCommand getOrders, IDeleteOrdersCommand deleteOrders)
 {
     _getShippers  = getShippers;
     _createOrder  = createOrder;
     _getOrders    = getOrders;
     _deleteOrders = deleteOrders;
 }
Example #2
0
 public IActionResult Post([FromBody] CreateOrderDto dto,
                           [FromServices] ICreateOrderCommand command)
 {
     dto.Id = actor.Id;
     executor.ExecuteCommand(command, dto);
     return(NoContent());
 }
 public OrdersController(CartIdProvider cartIdProvider,
                         IGetShoppingCartItemsListQuery getShoppingCartItemsListQuery,
                         ICreateOrderCommand createOrderCommand,
                         IGetApplicationUserDetails getApplicationUserDetails,
                         IGetApplicationUserId getApplicationUserId,
                         ISaveApplicationUserDetails saveApplicationUserDetails,
                         IGetUserOrdersListQuery getUserOrdersListQuery,
                         IDateTimeService dateTimeService,
                         IOrdersListViewModelFactory ordersListViewModelFactory,
                         IEmailSender emailSender)
 {
     _cartIdProvider = cartIdProvider;
     _getShoppingCartItemsListQuery = getShoppingCartItemsListQuery;
     _createOrderCommand            = createOrderCommand;
     _getApplicationUserDetails     = getApplicationUserDetails;
     _getApplicationUserId          = getApplicationUserId;
     _saveApplicationUserDetails    = saveApplicationUserDetails;
     _getUserOrdersListQuery        = getUserOrdersListQuery;
     _dateTimeService            = dateTimeService;
     _ordersListViewModelFactory = ordersListViewModelFactory;
     _emailSender = emailSender;
 }
Example #4
0
 public void Post([FromBody] OrderDto dto,
                  [FromServices] ICreateOrderCommand command)
 {
     _executor.ExecuteCommand(command, dto);
 }
Example #5
0
 public OrdersController(ICreateOrderCommand createOrderCommand, IGetOrderQuery getOrdersQuery, ILoggerFactory loggerFactory)
 {
     _createOrderCommand = createOrderCommand;
     _getOrdersQuery     = getOrdersQuery;
     _logger             = loggerFactory.CreateLogger("OrdersController");
 }
 public IActionResult Post([FromBody] CreateOrderDto dto, [FromServices] ICreateOrderCommand command)
 {
     _executor.ExecuteCommand(command, dto);
     return(StatusCode(StatusCodes.Status201Created));
 }
 public OrdersController(ICreateOrderCommand createCommand, IGetOrders query, IConfigurationRepository configuration)
 {
     this._createCommand = createCommand;
     this._query         = query;
     this._configuration = configuration;
 }