private void ConfigureEFUsage() { var productsDataProxy = new DAL.EF.ProductRepository(); var inventoryDataProxy = new DAL.EF.InventoryItemRepository(); var customerDataProxy = new DAL.EF.CustomerRepository(); var orderItemDataProxy = new DAL.EF.OrderItemRepository(); var orderRepository = new DAL.EF.OrderRepository(); var categoriesDataProxy = new DAL.EF.CategoryRepository(); _inventoryService = new InventoryItemService(inventoryDataProxy); _orderItemsService = new OrderItemService(orderItemDataProxy, productsDataProxy, inventoryDataProxy, new DTCTransactionContext()); _ordersService = new OrderService(orderRepository, _orderItemsService, new DTCTransactionContext()); _customersService = new CustomerService(customerDataProxy, _ordersService); _productsService = new ProductService(productsDataProxy, orderRepository, _inventoryService, new DTCTransactionContext()); _categoriesService = new CategoryService(categoriesDataProxy, productsDataProxy); this.DataContext = new MainWindowVM(_eventAggregator, _customersService, _productsService, _categoriesService, _ordersService, _inventoryService); }