コード例 #1
0
        public static ProductPropertyChoiceRepository InstantiateForMemory(RequestContext c)
        {
            ProductPropertyChoiceRepository result = null;
            ILogger logger = new MerchantTribe.Commerce.EventLog();

            result = new ProductPropertyChoiceRepository(c, new MemoryStrategy <Data.EF.bvc_ProductPropertyChoice>(PrimaryKeyType.Integer), logger);
            return(result);
        }
コード例 #2
0
        public static ProductPropertyChoiceRepository InstantiateForDatabase(RequestContext c)
        {
            ProductPropertyChoiceRepository result = null;
            ILogger logger = new MerchantTribe.Commerce.EventLog();

            result = new ProductPropertyChoiceRepository(c, new EntityFrameworkRepository <Data.EF.bvc_ProductPropertyChoice>(
                                                             new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)), logger);
            return(result);
        }
コード例 #3
0
 public ProductPropertyRepository(RequestContext c, IRepositoryStrategy <Data.EF.bvc_ProductProperty> r,
                                  IRepositoryStrategy <Data.EF.bvc_ProductPropertyChoice> subr,
                                  ILogger log)
 {
     context               = c;
     repository            = r;
     this.logger           = log;
     repository.Logger     = this.logger;
     this.choiceRepository = new ProductPropertyChoiceRepository(c, subr, this.logger);
 }