/// <summary> /// api controller constructor /// </summary> /// <param name="_commands">Command object</param> /// <param name="_queries">Query object</param> /// <param name="_orderLogic">Order logic object</param> /// <param name="_mapper">Automapper</param> public ecomController(IOrderCommand _commands, IOrderQuery _queries, IOrderLogic _orderLogic, IMapper _mapper) { commandService = _commands; queryService = _queries; orderLogic = _orderLogic; mapper = _mapper; }
public UserDashboardModel(IOrderQuery orderQuery, IAuthHelper authHelper, IOrderApplication orderApplication, IAccountApplication accountApplication) { _orderQuery = orderQuery; _authHelper = authHelper; _orderApplication = orderApplication; _accountApplication = accountApplication; }
public OrderSetToBilledCommandHandler( ILogger <OrderSetToBilledCommandHandler> logger, IOrderQuery orderQuery, IOrderRepository orderRepository) { _logger = logger; _orderQuery = orderQuery; _orderRepository = orderRepository; }
public void Execute(OnOrderCreated ev) { using (IUnitOfWork uow = new UnitOfWork(RepositoryType.MongoDb)) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(uow); query.Add(new App.Order.Query.Entity.Order(ev.OrderId)); uow.Commit(); } }
public void Setup() { fixture = new Fixture(); fixture.Behaviors.OfType <ThrowingRecursionBehavior>().ToList().ForEach(b => fixture.Behaviors.Remove(b)); fixture.Behaviors.Add(new OmitOnRecursionBehavior()); dbContext = new Mock <queryContext>(); query = new OrderQuery(dbContext.Object); }
public OrderUpdateWhenCustomerAndPaymentMethodVerifiedDomainEventHandler( ILogger <OrderUpdateWhenCustomerAndPaymentMethodVerifiedDomainEventHandler> logger, IOrderRepository orderRepository, IOrderQuery orderQuery /*IMediator mediator*/) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _orderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository)); // _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator)); _orderQuery = orderQuery ?? throw new ArgumentNullException(nameof(orderQuery)); }
public void Execute(OnOrderActivated ev) { using (IUnitOfWork uow = new UnitOfWork(RepositoryType.MongoDb)) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(uow); App.Order.Query.Entity.Order order = query.GetByOrderId(ev.OrderId); order.IsActivated = true; query.Update(order); uow.Commit(); } }
public void Execute(OnCustomerDetailChanged ev) { using (IUnitOfWork uow = new UnitOfWork(RepositoryType.MongoDb)) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(uow); App.Order.Query.Entity.Order order = query.GetByOrderId(ev.OrderId); order.Name = ev.CustomerName; query.Update(order); uow.Commit(); } }
public void Execute(OnOrderLineItemAdded ev) { using (IUnitOfWork uow = new UnitOfWork(RepositoryType.MongoDb)) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(uow); App.Order.Query.Entity.Order order = query.GetByOrderId(ev.OrderId); order.OrderLines.Add(new OrderLine(ev.ProductId, ev.ProductName, ev.Quantity, ev.Price)); order.TotalItems += ev.Quantity; order.TotalPrice += ev.Price * (decimal)ev.Quantity; query.Update(order); uow.Commit(); } }
public TradeAppService(ITradeQuery queryTrade, ITradeRepository tradeRepository, IOrderQuery orderQuery, IOrderRepository orderRepository, ISupplierRepository supplierRepository, IMaterialRepository materialRepository, IActionCategoryRepository actionCategoryRepository, IContractAircraftRepository contractAircraftRepository, IContractEngineRepository contractEngineRepository, IRelatedDocRepository relatedDocRepository,IPnRegRepository pnregRepository) { _tradeQuery = queryTrade; _tradeRepository = tradeRepository; _orderQuery = orderQuery; _orderRepository = orderRepository; _supplierRepository = supplierRepository; _materialRepository = materialRepository; _actionCategoryRepository = actionCategoryRepository; _contractAircraftRepository = contractAircraftRepository; _contractEngineRepository = contractEngineRepository; _relatedDocRepository = relatedDocRepository; _pnRegRepository = pnregRepository; }
/// <summary> /// 初始化订单控制器 /// </summary> /// <param name="mediator">IMediator</param> /// <param name="orderQuery">订单查询</param> public OrdersController(IMediator mediator, IOrderQuery orderQuery) { _mediator = mediator; _orderQuery = orderQuery; }
public IndexModel(IMediator mediator, IOrderQuery orderQuery) { _mediator = mediator; _orderQuery = orderQuery; }
public OrderApplication(ICommandMediator mediatorHandler, IOrderQuery orderQuery) { this._mediatorHandler = mediatorHandler ?? throw new ArgumentNullException(nameof(mediatorHandler)); this._orderQuery = orderQuery ?? throw new ArgumentNullException(nameof(orderQuery)); }
public OrderController(IOrderCommand command, IOrderQuery query) { _command = command; _query = query; }
public MenuViewComponent(IOrderQuery orderQuery, ICategoryQuery categoryQuery, IArticleCategoryQuery articleCategoryQuery) { _orderQuery = orderQuery; _categoryQuery = categoryQuery; _articleCategoryQuery = articleCategoryQuery; }
/// <summary> /// 倒序 /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="TResult"></typeparam> /// <param name="obj"></param> /// <param name="predicate"></param> /// <returns></returns> public static IOrderQuery <T> ThenByDescending <T, TResult>(this IOrderQuery <T> obj, Expression <Func <T, TResult> > predicate) { obj.OrderBy = $"{obj.OrderBy},{QueryableBuilder.GetPropertyName(predicate)} DESC"; return(obj); }
public OrderAppService(IOrderQuery orderQuery) { _orderQuery = orderQuery; }
public OrderByIdQueryHandler(ILogger <OrderByIdQueryHandler> logger, IOrderQuery orderQuery) { _logger = logger; _orderQuery = orderQuery; }
public orderController(IOrderCommands _commands, IOrderQuery _orders, IMapper _mapper) { commandSerive = _commands; orderService = _orders; mapper = _mapper; }
public OrderLogic(IOrderQuery _queries) { queryService = _queries; }
public DetailModel(IMediator mediator, IOrderQuery orderQuery) { _mediator = mediator; _orderQuery = orderQuery; }
public OrderSummary GetOrder(string id) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(); return(query.GetOrder <OrderSummary>(id)); }
public OrderProvider(IOrderQuery query) { _query = query; }
public IList <OrderSummaryItem> GetOrders() { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(); return(query.GetOrders <OrderSummaryItem>()); }
/// <summary> /// Initializes a new instance of the <seealso cref="OrderRepository"/> class. /// </summary> /// <param name="context">Context for accessing products</param> /// <param name="query">Query object for order filtering</param> public OrderRepository(ProductContext context, IOrderQuery query) : base(context) { _orderQuery = query; }
public OrderService(IOrderQuery orderQuery) { _orderQuery = orderQuery; }
public OrderController(IMediator mediator, INotificationHandler <ExceptionNotification> notifications, IOrderQuery orderQuery) : base(notifications) { _mediator = mediator; _orderQuery = orderQuery; }