コード例 #1
0
        public CatalogController()
        {
            Func<StoreDbEntities> createStoreContext = () => new StoreDbEntities();
            var sqlRepository = new SqlCatalogRepository( createStoreContext );
            _catalogService = new CatalogService( sqlRepository );

            _licenseTypeService = new LicensingBasisService();
        }
コード例 #2
0
        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 );
        }