public CatalogController() { Func<StoreDbEntities> createStoreContext = () => new StoreDbEntities(); var sqlRepository = new SqlCatalogRepository( createStoreContext ); _catalogService = new CatalogService( sqlRepository ); _licenseTypeService = new LicensingBasisService(); }
public PurchaseController() { Func<StoreDbEntities> createStoreContext = ( )=> new StoreDbEntities( ); var sqlRepository = new SqlPurchaseRecordRepository( createStoreContext ); _purchaseService = new PurchaseService( sqlRepository ); var sqlCatalogRepository = new SqlCatalogRepository( createStoreContext ); _catalogService = new CatalogService( sqlCatalogRepository ); _licensingService = new LicensingService( SoftwarePotentialConfiguration.File.ReadCredentials() ); var sqlOrderItemRepository = new SqlOrderItemRepository( createStoreContext ); _orderItemService = new OrderItemService( sqlOrderItemRepository ); }