public void Setup()
        {
            mock = MockRepository.GenerateMock<IOrdersRepository>();
            stub = MockRepository.GenerateStub<ITax>();
            ordersRepositoryTestClass = new OrdersRepositoryTestClass();
            listOrders = new List<Order>();

            Order order = new Order();
            order.AddItem(LineItemFactory.GetLineItem("book", 12.49M,1,ItemType.Exempt));
            order.AddItem(LineItemFactory.GetLineItem("CD", 14.99M, 1,ItemType.Basic));
            order.AddItem(LineItemFactory.GetLineItem("chocolate bar", 0.85M, 1, ItemType.Exempt));
            listOrders.Add(order);

            order = new Order();
            order.AddItem(LineItemFactory.GetLineItem("imported chocolates", 10.0M, 1, ItemType.Import));
            order.AddItem(LineItemFactory.GetLineItem("imported perfume", 47.5M, 1, ItemType.Basic | ItemType.Import));
            listOrders.Add(order);

            order = new Order();
            order.AddItem(LineItemFactory.GetLineItem("imported perfume", 27.99M, 1, ItemType.Basic | ItemType.Import));
            order.AddItem(LineItemFactory.GetLineItem("perfume", 18.99M, 1, ItemType.Basic));
            order.AddItem(LineItemFactory.GetLineItem("pills", 19.75M, 1, ItemType.Exempt));
            order.AddItem(LineItemFactory.GetLineItem("imported chocolates", 1.25M,1, ItemType.Import));
            listOrders.Add(order);
        }
 public HomeController(ITradersRepository trdRep, IOrdersRepository ordRep, IInvoicesRepository invRep, IContractsRepository cntrRep)
 {
     _tradersRepository = trdRep;
     _ordersRepository = ordRep;
     _invoicesRepository = invRep;
     _contractsRepository = cntrRep;
 }
 public NorthwindUnitOfWork()
 {
     _dbContext = new NorthwindSlim();
     _productsRepository = new ProductsRepository(_dbContext);
     _customersRepository = new CustomersRepository(_dbContext);
     _ordersRepository = new OrdersRepository(_dbContext);
 }
Example #4
0
 public OrderHandler(IOrdersRepository ordersRepository, IOrderItemRepository orderItemRepository, IOrderOrderStatusRepository orderOrderStatusRepository, IUnitOfWork unitOfWork)
 {
     _unitOfWork = unitOfWork;
     _ordersRepository = ordersRepository;
     _orderItemRepository = orderItemRepository;
     _orderOrderStatusRepository = orderOrderStatusRepository;
 }
 public ManageOrdersController(IOrdersRepository ordersRepository, IOrderStateRepository orderStateRepository,
     IOrderDetailsRepository orderDetailsRepository)
 {
     _ordersRepository = ordersRepository;
     _orderStateRepository = orderStateRepository;
     _orderDetailsRepository = orderDetailsRepository;
 }
 public OrdersService(IOrdersRepository ordersRepository, IStorageItemsRepository storageItemsRepository, IClientsRepository clientsRepository, IMailService mailService)
 {
     _ordersRepository = ordersRepository;
     _storageItemsRepository = storageItemsRepository;
     _clientsRepository = clientsRepository;
     _mailService = mailService;
 }
 public CustomerDIController(ICustomerRepository customerRepository, IOrdersRepository ordersRepository, ILogger logger, INotificationProvider notificationProvider)
 {
     _customerRepository = customerRepository;
     _ordersRepository = ordersRepository;
     _logger = logger;
     _notificationProvider = notificationProvider;
 }
        public OrdersEditorPresentationModel(OrdersCommandProxy commandProxy, IOrdersRepository ordersRepository)
        {
            this.commandProxy = commandProxy;
            this.ordersRepository = ordersRepository;
            Orders = new ObservableCollection<OrderPresentationModel>();

            PopulateOrders();
        }
Example #9
0
 public OrderService(IUserRepository userRepository, IShopRepository shopRepository, IOrdersRepository ordersRepository, IProductRepository productRepository,
                     IPriceRepository priceRepository, IImageRepository imageRepository, IStrategy _strategy, ShopsChecker _shopsChecker)
 {
     imgRepo      = imageRepository;
     shopRepo     = shopRepository;
     ordersRepo   = ordersRepository;
     productRepo  = productRepository;
     shopsChecker = _shopsChecker;
     strategy     = _strategy;
 }
Example #10
0
 public UnitOfWork(ICustomerRepository customerRepository,
                   IProductRepository productRepository,
                   IOrdersRepository orderRepository,
                   IOrderDetailsRepository orderDetailsRepository)
 {
     Customers    = customerRepository;
     Products     = productRepository;
     Orders       = orderRepository;
     OrderDetails = orderDetailsRepository;
 }
 public ordersController(IBraintreeGate brain, IMapper mapper, IOrdersRepository ordersRepository, DataContext context, IProductRepository productRepository, IOrderDetailRepository orderDetailRepository, IUserRepository userRepository)
 {
     _userRepository        = userRepository;
     _orderDetailRepository = orderDetailRepository;
     _productRepository     = productRepository;
     _context          = context;
     _mapper           = mapper;
     _ordersRepository = ordersRepository;
     _brain            = brain;
 }
Example #12
0
        public CustomerService(ICacheService cacheService, IOrdersRepository ordersRepository, ICustomerRepository customerRepository)
        {
            _cacheService = cacheService;
            _customerRepository = customerRepository;

            GetCustomerDetails =
            _cacheService.Encachify(
                (int i) => string.Format(@"CustomerDetails{0}", i),
                GetCustomerDetailsCore);
        }
 public ShoppingCartModel()
 {
     INhibernateConnection connection = new NHibernateConnection();
     ISessionFactory sessionFactory = connection.CreateSessionFactory();
     ISession _session = sessionFactory.OpenSession();
     _cartRepo = new ShoppingCartRepository(connection);
     _orderRepo = new OrdersRepository(connection);
     _orderDetailsRepo = new OrderDetailsRepository(connection);
     _producRepo = new ProductsRepository(connection);
 }
 public void Setup()
 {
     this._auroraOrdersRepository   = A.Fake <IOrdersRepository>();
     this._orderAllocationProjector = A.Fake <IOrdersToAllocatedOrdersProjector>();
     this._auroraMarketRepository   = A.Fake <IReddeerMarketRepository>();
     this._marketService            = A.Fake <IMarketOpenCloseEventService>();
     this._opCtx        = A.Fake <ISystemProcessOperationContext>();
     this._sortComparer = A.Fake <IUniverseSortComparer>();
     this._logger       = A.Fake <ILogger <UniverseBuilder> >();
 }
        public OrdersEditorPresentationModel(OrdersEditorView view, IOrdersRepository ordersRepository, OrdersCommandProxy commandProxy)
        {
            this.ordersRepository = ordersRepository;
            this.commandProxy = commandProxy;
            this.Orders = new ObservableCollection<OrderPresentationModel>();
            this.PopulateOrders();

            this.View = view;
            view.Model = this;
        }
Example #16
0
 public OrdersController(IOrdersRepository ordersRepository,
                         IProductService productService, IMapper mapper)
 {
     _ordersRepository = ordersRepository ??
                         throw new ArgumentNullException(nameof(ordersRepository));
     _productService = productService ??
                       throw new ArgumentNullException(nameof(productService));
     _mapper = mapper ??
               throw new ArgumentNullException(nameof(mapper));
 }
Example #17
0
        public OrdersController(IOrdersRepository ordersRepository)
        {
            var fakeResponseHandler = new FakeResponseHandler(ordersRepository);
            var httpClient          = new HttpClient(fakeResponseHandler)
            {
                BaseAddress = new Uri("http://test.com/api/")
            };

            client = new OrdersXmlClient(httpClient);
        }
Example #18
0
            public Handler(
                [NotNull] IOrdersRepository ordersRepository,
                [NotNull] IMapper mapper)
            {
                Guard.NotNull(ordersRepository, nameof(ordersRepository));
                Guard.NotNull(mapper, nameof(mapper));

                _ordersRepository = ordersRepository;
                _mapper           = mapper;
            }
Example #19
0
 public IActionResult ShowOrders([FromServices] IOrdersRepository ordersRepository)
 {
     return(View(ordersRepository.GetNotConfirmedOrders()
                 .Select(order => new ShowOrderViewModel
     {
         OrderID = order.OrderId,
         DateReturn = order.DateReturn,
         UserName = order.User.FullName
     })
                 .ToList()));
 }
Example #20
0
        /*
         * private readonly ICacheService<Product> _csp;
         * private readonly ICacheService<ProductGroup> _cspg;
         */

        public TestController(IDictionaryRepository context, IOrdersRepository ordContext /*, ICacheService<Product> csp, ICacheService<ProductGroup> cspg*/)

        {
            _dbContext       = context;
            _dbOrdersContext = ordContext;

            /*
             * _csp = csp;
             * _cspg = cspg;
             */
        }
Example #21
0
 public UnitOfWork(EFDBContext context, ICoffeeMachineRepository coffeeMachineRepository,
                   IDrinkRepository drinkRepository, ICoffeeMachineIngredientsRepository coffeeMachineIngredientsRepository,
                   IDrinkIngredientsRepository drinkIngredientsRepository, IOrdersRepository orderRepository)
 {
     _context                 = context;
     CoffeeMachines           = coffeeMachineRepository;
     Drinks                   = drinkRepository;
     CoffeeMachineIngredients = coffeeMachineIngredientsRepository;
     Orders                   = orderRepository;
     DrinkIngredients         = drinkIngredientsRepository;
 }
Example #22
0
 public ExecutionEventHandler(
     [NotNull] ILogFactory logFactory,
     IHistoryRecordsRepository historyRecordsRepository,
     IOrdersRepository ordersRepository,
     IReadOnlyList <string> walletIds)
 {
     _log = logFactory.CreateLog(nameof(ExecutionEventHandler));
     _historyRecordsRepository = historyRecordsRepository;
     _ordersRepository         = ordersRepository;
     _walletIds = walletIds;
 }
Example #23
0
        public void Index(ICustomersRepository customersRepo, IOrdersRepository ordersRepo)
        {
            // Arrange
            HomeController controller = new HomeController(customersRepo, ordersRepo);

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }
Example #24
0
 public StatusOrderFormModelBuilder(
     IStringLocalizer <GlobalResources> globalLocalizer,
     IStringLocalizer <OrderResources> orderLocalizer,
     LinkGenerator linkGenerator,
     IOrdersRepository ordersRepository)
 {
     this.globalLocalizer  = globalLocalizer;
     this.orderLocalizer   = orderLocalizer;
     this.linkGenerator    = linkGenerator;
     this.ordersRepository = ordersRepository;
 }
Example #25
0
 public CreateOrderService(
     OrderFactory orderFactory,
     IOrdersRepository ordersRepository,
     ILastUserOrderProvider lastOrderProvider,
     IMediator mediator
     )
 {
     (this.orderFactory, orders, this.mediator) =
         (orderFactory, ordersRepository, mediator);
     this.lastOrderProvider = lastOrderProvider;
 }
Example #26
0
 public UserRegister
     (ITokenGenerator tokenGenerator,
     IOrdersRepository ordersRepository,
     IUnitOfWork unitOfWork,
     IMapper mapper)
 {
     _tokenGenerator   = tokenGenerator;
     _ordersRepository = ordersRepository;
     _unitOfWork       = unitOfWork;
     _mapper           = mapper;
 }
Example #27
0
 public PlaceOrderCustomer(IEventBus eventBus, ICostCalculator costCalculator,
                           IOrderNumberGenerator orderNumberGenerator, IOrdersRepository ordersRepository, OrdersDbContext dbContext,
                           ICommandBus commandBus)
 {
     _eventBus             = eventBus;
     _costCalculator       = costCalculator;
     _orderNumberGenerator = orderNumberGenerator;
     _ordersRepository     = ordersRepository;
     _dbContext            = dbContext;
     _commandBus           = commandBus;
 }
 public OrdersController(
     Helpers helpers,
     UserManager <ShopUser> userManager,
     IOrdersRepository repository,
     IMapper mapper)
 {
     _helpers     = helpers ?? throw new ArgumentNullException(nameof(helpers));
     _userManager = userManager ?? throw new ArgumentNullException(nameof(userManager));
     _repository  = repository ?? throw new ArgumentNullException(nameof(repository));
     _mapper      = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Example #29
0
        static void GetNewOrderInput(IOrdersRepository order)
        {
            Random rnd        = new Random();
            int    customerId = rnd.Next(1200000);
            var    _order     = new Orders(customerId);

            order.AddOrder(_order);
            CustomerId = _order.CustomerId;
            var _orderId = order.GetOrderId(CustomerId);

            OrderId = _orderId.OrderId;
        }
 public OrdersService(
     IOrdersRepository ordersRepository,
     IPostamatsRepository postamatsRepository,
     IPhoneNumberValidator phoneNumberValidator,
     IPostamatNumberValidator postamatNumberValidator
     )
 {
     _ordersRepository        = ordersRepository;
     _postamatsRepository     = postamatsRepository;
     _phoneNumberValidator    = phoneNumberValidator;
     _postamatNumberValidator = postamatNumberValidator;
 }
Example #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AutoSchedule"/> class.
 /// </summary>
 /// <param name="ordersRepository">
 /// The orders repository.
 /// </param>
 /// <param name="publisher">
 /// The publisher.
 /// </param>
 /// <param name="activeRulesService">
 /// The active rules service.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 public AutoSchedule(
     IOrdersRepository ordersRepository,
     IQueueScheduleRulePublisher publisher,
     IActiveRulesService activeRulesService,
     ILogger <AutoSchedule> logger)
 {
     this.ordersRepository   = ordersRepository ?? throw new ArgumentNullException(nameof(ordersRepository));
     this.publisher          = publisher ?? throw new ArgumentNullException(nameof(publisher));
     this.activeRulesService =
         activeRulesService ?? throw new ArgumentNullException(nameof(activeRulesService));
     this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public OrdersController(IOrdersRepository ordersRepository,
                         ILogger <OrdersController> logger,
                         IConfiguration configuration,
                         ITelemetryClientFactory telemetryClientFactory,
                         IVaultService vaultService)
 {
     _ordersRepository       = ordersRepository;
     _logger                 = logger;
     _configuration          = configuration;
     _telemetryClientFactory = telemetryClientFactory;
     _vaultService           = vaultService;
 }
 public OrdersServiceProvider(
     IUnitOfWork uow,
     IMemoryCache cache,
     IOrdersRepository customersRepository,
     ILogger <OrdersServiceProvider> logger,
     IMapper mapper) : base(uow)
 {
     _cache = cache;
     _customersRepository = customersRepository;
     _logger = logger;
     _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Example #34
0
 public AdminController(IProductRepository productRepository,
                        IUserRepository userRepository,
                        IOrdersRepository ordersRepository,
                        IDeliveryRepository deliveryRepository,
                        IOrderDetailsRepository orderDetailsRepository)
 {
     products      = productRepository;
     users         = userRepository;
     orders        = ordersRepository;
     deliveries    = deliveryRepository;
     ordersDetails = orderDetailsRepository;
 }
Example #35
0
 public UnitOfWork(BookStoreContext context,
                   IAuthorsRepository authorsRepository,
                   IBooksRepository booksRepository,
                   IOrdersRepository ordersRepository,
                   IOrderItemsRepository orderItemsRepository)
 {
     this._context   = context;
     this.Authors    = authorsRepository;
     this.Books      = booksRepository;
     this.Orders     = ordersRepository;
     this.OrderItems = orderItemsRepository;
 }
Example #36
0
 public OrdersPageCatalogModelBuilder(
     ICatalogOrderModelBuilder catalogModelBuilder,
     IOrdersRepository ordersRepository,
     IStringLocalizer <GlobalResources> globalLocalizer,
     IStringLocalizer <OrderResources> orderLocalizer,
     LinkGenerator linkGenerator)
 {
     this.catalogModelBuilder = catalogModelBuilder;
     this.ordersRepository    = ordersRepository;
     this.globalLocalizer     = globalLocalizer;
     this.orderLocalizer      = orderLocalizer;
     this.linkGenerator       = linkGenerator;
 }
Example #37
0
 public OrdersBL(IPersonsRepository personsRepository, IOrdersRepository ordersRepository,
                 IOrderStatusHistoryItemsRepository orderStatusHistoryItemsRepository,
                 IOrderedProductsRepository orderedProductsRepository, IProductsRepository productsRepository,
                 IMailService mailService, IUsersRepository usersRepository)
 {
     _personsRepository = personsRepository;
     _ordersRepository  = ordersRepository;
     _orderStatusHistoryItemsRepository = orderStatusHistoryItemsRepository;
     _orderedProductsRepository         = orderedProductsRepository;
     _productsRepository = productsRepository;
     _mailService        = mailService;
     _usersRepository    = usersRepository;
 }
Example #38
0
        public OrdersEditorViewModel(IOrdersRepository ordersRepository, OrdersCommandProxy commandProxy)
        {
            _ordersRepository = ordersRepository;
            _commandProxy     = commandProxy;

            PopulateOrders();

            Orders = new ListCollectionView(_orders);
            Orders.CurrentChanged += SelectedOrder_Changed;
            Orders.MoveCurrentTo(null);

            ProcessOrderCommand = new DelegateCommand <object>(ProcessOrder);
        }
Example #39
0
 public OrderController(
     IOrdersRepository ordersRepository,
     IProductsRepository productsRepository,
     IEmailService emailService,
     IOptions <AppSettings> appSettings,
     IHostingEnvironment env)
 {
     this.ordersRepository   = ordersRepository;
     this.productsRepository = productsRepository;
     this.emailService       = emailService;
     this.appSettings        = appSettings;
     this.env = env;
 }
 public OrdersService(
     IOrdersRepository orderRepository,
     IProductsRepository productRepository,
     IUsersRepository userRepository,
     IOrdersDomainService orderDomainService,
     IStockDispatcher stockDispatcher)
 {
     _orderRepository    = orderRepository;
     _productRepository  = productRepository;
     _userRepository     = userRepository;
     _orderDomainService = orderDomainService;
     _stockDispatcher    = stockDispatcher;
 }
 public ExecutionQueueReader(
     ILogFactory logFactory,
     string connectionString,
     IHistoryRecordsRepository historyRecordsRepository,
     IOrdersRepository ordersRepository,
     int prefetchCount,
     int batchCount,
     IReadOnlyList <string> walletIds)
     : base(logFactory, connectionString, prefetchCount, batchCount, walletIds)
 {
     _historyRecordsRepository = historyRecordsRepository;
     _ordersRepository         = ordersRepository;
 }
 protected BaseController(
     IOrdersRepository ordersRepository, 
     IOrderDetailsRepository orderDetailsRepository,
     IUserRepository usersRepository,
     ICategoryRepository catRepo,
     IManufacturersRepository manufacturersRepository)
 {
     _userRepository = usersRepository;
     _ordersRepository = ordersRepository;
     _orderDetailsRespo = orderDetailsRepository;
     _catRepo = catRepo;
     _manufacturersRepository = manufacturersRepository;
 }
 protected BaseController(
     IOrdersRepository ordersRepository, 
     IOrderDetailsRepository orderDetailsRepository,
     IUserRepository usersRepository,
     ICategoryRepository catRepo,
     IManufacturersRepository manufacturersRepository)
 {
     UserRepository = usersRepository;
     OrdersRepository = ordersRepository;
     OrderDetailsRespo = orderDetailsRepository;
     CatRepo = catRepo;
     ManufacturersRepository = manufacturersRepository;
     AutoLoginRememberedUser();
 }
 public SetupController(ICategoryRepository catRepo, IOrderDetailsRepository orderDetailsRepository,
     IOrdersRepository orderRepo, IManufacturersRepository manuRepo,
     IProductImagesRepository productImgRepo, IUserRepository userRepo, INhibernateConnection conn,
     IProductsRepository productRepo,
     IDeliveryTypesRepository deliveryRepo)
 {
     _manuRepo = manuRepo;
     _productRepo = productRepo;
     _catRepo = catRepo;
     _productImagesRepository = productImgRepo;
     _userRepo = userRepo;
     _ordersRepository = orderRepo;
     _orderDetailsRepository = orderDetailsRepository;
     _deliveryRepo = deliveryRepo;
     _session = conn.CreateSessionFactory().OpenSession();
 }
 public MyAccountController(
     IUserRepository userRepo,
     IOrdersRepository orderRepo,
     IOrderDetailsRepository orderDetailsRespo,
     ICategoryRepository catRepo,
     IManufacturersRepository manufacturersRepository)
     : base(orderRepo,orderDetailsRespo,userRepo,catRepo,manufacturersRepository)
 {
     myAccountLogic = new MyAccount(userRepo);
     _cookie = new HttpCookie("userId");
     _isAdminCookie = new HttpCookie("isAdmin");
     ViewBag.Categories = GetCategories();
     ViewBag.Manufacturers = GetManufacturers();
     ViewBag.CategorySelectList = GetCategoryList();
     ViewBag.IsAdmin = false;
 }
        public OrdersEditorPresentationModel( IOrdersRepository ordersRepository, OrdersCommandProxy commandProxy )
        {
            this.ordersRepository = ordersRepository;
            this.commandProxy     = commandProxy;

            // Create dummy order data.
            this.PopulateOrders();

            // Initialize a CollectionView for the underlying Orders collection.
#if SILVERLIGHT
            this.Orders = new PagedCollectionView( _orders );
#else
            this.Orders = new ListCollectionView( _orders );
#endif
            // Track the current selection.
            this.Orders.CurrentChanged += SelectedOrderChanged;
        }
        public OrdersEditorViewModel(IOrdersRepository ordersRepository, OrdersCommandProxy commandProxy)
        {
            this.ordersRepository = ordersRepository;
            this.commandProxy     = commandProxy;

            // Create dummy order data.
            this.PopulateOrders();

            // Initialize a CollectionView for the underlying Orders collection.
            this.Orders = new ListCollectionView(_orders);

            // Track the current selection.
            this.Orders.CurrentChanged += SelectedOrderChanged;
            this.Orders.MoveCurrentTo(null);

            this.ProcessOrderCommand = new DelegateCommand<object>(ProcessOrder);
        }
        public DataServiceController(IContractsRepository cntrcRep,
									 ITradersRepository trdrRep,
									 IOrdersRepository ordRep,
									 IInvoicesRepository invRep,
									 IItemsRepository itmRep,
									 IAirportsRepository airRep,
									 IAircraftsRepository acrRep,
                                     ICurrenciesRepository curRep)
        {
            _contractsRepository = cntrcRep;
            _tradersRepository = trdrRep;
            _ordersRepository = ordRep;
            _invoicesRepository = invRep;
            _itemsRepository = itmRep;
            _airportsRepository = airRep;
            _aircraftsRepository = acrRep;
            _currenciesRepository = curRep;
        }
        public CustomersViewModel(
            IMessageDialogService messageDialogService,
            ICustomersRepository customersRepository,
            IOrdersRepository ordersRepository)
        {
            _messageDialogService = messageDialogService;
            _customersRepository = customersRepository;
            _ordersRepository = ordersRepository;

            Customers =
                new ObservableCollection<CustomerWrapper>(
                    _customersRepository.GetCustomers().Select(x => new CustomerWrapper(x)));

            OrderStatuses = new ObservableCollection<OrderStatusWrapper>(
                    _ordersRepository.GetOrderStatuses().Select(x => new OrderStatusWrapper(x)));

            SaveCommand = new DelegateCommand(OnAdd);
            CancelCommand = new DelegateCommand(OnCancel);
        }
Example #50
0
 public DataManager(ILoginsRepository logins, IAuthorsRepository authors,
                     IGenresRepository genres, IDateRepository dates,
                     IPlaysRepository plays,IOrdersRepository orders, 
                     IRepertoireRepository repertories, ICategoryRepository categories,
                     ICategoriesInfoRepository categoriesInfo, ICourierInfoRepository courierInfo,
                     PrimaryMembershipProvider provider, CustomRoleProvider roleProvider)
 {
     this.logins = logins;
     this.genres = genres;
     this.authors = authors;
     this.dates = dates;
     this.plays = plays;
     this.orders = orders;
     this.provider = provider;
     this.repertories = repertories;
     this.categories = categories;
     this.categoriesInfo = categoriesInfo;
     this.courierInfo = courierInfo;
     this.roleProvider = roleProvider;
 }
 public FakeResponseHandler(IOrdersRepository repository)
 {
     this.repository = repository;
 }
 public SrvAssetPairBestPriceBroadcaster(IOrdersRepository ordersRepository, IAssetPairBestPriceNotifier[] assetPairBestPriceNotifiers)
 {
     _ordersRepository = ordersRepository;
     _assetPairBestPriceNotifiers = assetPairBestPriceNotifiers;
 }
 public SrvLimitOrderBookGenerator(IOrdersRepository ordersRepository)
 {
     _ordersRepository = ordersRepository;
 }
 public AnalysisController(IOrdersRepository ordersRepository, IOrderDetailsRepository orderDetailsRepository)
 {
     _analysisModule = new AnalysisModule(orderDetailsRepository, ordersRepository);
 }
        public void PrepareRepositories(bool initialize = false)
        {
            // Kick the model creation process if not already created (hence force is false). In other words, do
            // not wait on any database activities. Without this, nothing happens unless some context activities take
            // place.
            _context = new AviTradeContext();
            if (initialize)
            {
                // Kick the model creation process if not already created (hence force is false). In other words, do
                // not wait on any database activities. Without this, nothing happens unless some context activities take
                // place.
                _context.Database.Initialize(force: false);
            }

            _contractsRepository = new ContractsRepository(_context);
            _airportsRepository = new AirportsRepository(_context);
            _aircraftsRepository = new AircraftsRepository(_context);
            _itemsRepository = new ItemsRepository(_context);
            _currenciesRepository = new CurrenciesRepository(_context);
            _periodsRepository = new PeriodsRepository(_context);
            _invoicesRepository = new InvoicesRepository(_context, _periodsRepository);
            _ordersRepository = new OrdersRepository(_context, _contractsRepository, _airportsRepository,
                                                     _aircraftsRepository, _itemsRepository, _currenciesRepository,
                                                     _invoicesRepository);
            _tradersRepository = new TradersRepository(_context);
        }
Example #56
0
 /// <summary>
 /// Constructor using Ninject - Dependency Injection 
 /// </summary>
 /// <param name="ordersRepository">the orders repository to use</param>
 /// <param name="modelFactory">the model factory to use</param>
 public OrdersController(IOrdersRepository ordersRepository, ModelFactory modelFactory)
 {
     _ordersRepository = ordersRepository;
     _modelFactory = modelFactory;
 }
 public MobileServiceController()
 {
     ordersRepository = new OrdersRepository(new MainUnitOfWork(ConfigurationManager.AppSettings["AzureConnectionString"]));
     usersRepository = new UsersRepository(new MainUnitOfWork(ConfigurationManager.AppSettings["AzureConnectionString"]));
 }
 public OrderController(IOrdersRepository repository)
 {
     this._repository = repository;
 }
Example #59
0
 public OrdersController(IOrdersRepository ordersRepository)
 {
     _ordersRepository = ordersRepository;
 }
 public SrvOrdersRegistrator(IOrdersRepository ordersRepository, IIdentityGenerator identityGenerator, IOrderExecuter orderExecuter)
 {
     _ordersRepository = ordersRepository;
     _identityGenerator = identityGenerator;
     _orderExecuter = orderExecuter;
 }