예제 #1
0
        public static VariantRepository InstantiateForDatabase(RequestContext c)
        {
            VariantRepository result = null;

            result = new VariantRepository(c,
                                           new EntityFrameworkRepository <Data.EF.bvc_Variants>(
                                               new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)),
                                           new SupressLogger());
            return(result);
        }
예제 #2
0
 private ProductRepository(RequestContext c, IRepositoryStrategy <Data.EF.bvc_Product> r,
                           IRepositoryStrategy <Data.EF.bvc_ProductOptions> opts,
                           IRepositoryStrategy <Data.EF.bvc_ProductOptionsItems> optitems,
                           IRepositoryStrategy <Data.EF.bvc_ProductXOption> optionCrosses,
                           IRepositoryStrategy <Data.EF.bvc_Variants> vars,
                           IRepositoryStrategy <Data.EF.bvc_ProductImage> images,
                           IRepositoryStrategy <Data.EF.bvc_ProductReview> reviews,
                           ILogger log)
 {
     context                = c;
     repository             = r;
     this.logger            = log;
     repository.Logger      = this.logger;
     this.optionRespository = new OptionRepository(c, opts, optitems, optionCrosses, this.logger);
     this.variantRepository = new VariantRepository(c, vars, this.logger);
     this.imageRepository   = new ProductImageRepository(c, images, this.logger);
     this.reviewRepository  = new ProductReviewRepository(c, reviews, this.logger);
 }
예제 #3
0
 public static CatalogService InstantiateForDatabase(RequestContext c)
 {
     return(new CatalogService(c,
                               CategoryRepository.InstantiateForDatabase(c),
                               CategoryProductAssociationRepository.InstantiateForDatabase(c),
                               ProductRepository.InstantiateForDatabase(c),
                               ProductRelationshipRepository.InstantiateForDatabase(c),
                               ProductImageRepository.InstantiateForDatabase(c),
                               ProductReviewRepository.InstantiateForDatabase(c),
                               VariantRepository.InstantiateForDatabase(c),
                               OptionRepository.InstantiateForDatabase(c),
                               ProductOptionAssociationRepository.InstantiateForDatabase(c),
                               ProductFileRepository.InstantiateForDatabase(c),
                               ProductVolumeDiscountRepository.InstantiateForDatabase(c),
                               ProductPropertyValueRepository.InstantiateForDatabase(c),
                               ProductInventoryRepository.InstantiateForDatabase(c),
                               ProductTypeRepository.InstantiateForDatabase(c),
                               ProductTypePropertyAssociationRepository.InstantiateForDatabase(c),
                               ProductPropertyRepository.InstantiateForDatabase(c),
                               WishListItemRepository.InstantiateForDatabase(c)));
 }
예제 #4
0
 public CatalogService(RequestContext c,
                       CategoryRepository categories,
                       CategoryProductAssociationRepository crosses,
                       ProductRepository products,
                       ProductRelationshipRepository relationships,
                       ProductImageRepository productImages,
                       ProductReviewRepository productReviews,
                       VariantRepository productVariants,
                       OptionRepository productOptions,
                       ProductOptionAssociationRepository productsXOptions,
                       ProductFileRepository productFiles,
                       ProductVolumeDiscountRepository volumeDiscounts,
                       ProductPropertyValueRepository propertyValues,
                       ProductInventoryRepository inventory,
                       ProductTypeRepository types,
                       ProductTypePropertyAssociationRepository typesXProperties,
                       ProductPropertyRepository properties,
                       WishListItemRepository wishItems)
 {
     context                      = c;
     Categories                   = categories;
     CategoriesXProducts          = crosses;
     ProductRelationships         = relationships;
     this.Products                = products;
     this.ProductImages           = productImages;
     this.ProductReviews          = productReviews;
     this.ProductVariants         = productVariants;
     this.ProductOptions          = productOptions;
     this.ProductsXOptions        = productsXOptions;
     this.ProductFiles            = productFiles;
     this.VolumeDiscounts         = volumeDiscounts;
     this.ProductPropertyValues   = propertyValues;
     this.ProductInventories      = inventory;
     this.ProductTypes            = types;
     this.ProductTypesXProperties = typesXProperties;
     this.ProductProperties       = properties;
     this.WishListItems           = wishItems;
 }