public static PolicyBlockRepository InstantiateForMemory(RequestContext c)
        {
            PolicyBlockRepository result = null;
            ILogger logger = new MerchantTribe.Commerce.EventLog();

            result = new PolicyBlockRepository(c, new MemoryStrategy <Data.EF.bvc_PolicyBlock>(PrimaryKeyType.Bvin), logger);
            return(result);
        }
        public static PolicyBlockRepository InstantiateForDatabase(RequestContext c)
        {
            PolicyBlockRepository result = null;
            ILogger logger = new MerchantTribe.Commerce.EventLog();

            result = new PolicyBlockRepository(c, new EntityFrameworkRepository <Data.EF.bvc_PolicyBlock>(
                                                   new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)), logger);
            return(result);
        }
Ejemplo n.º 3
0
 public PolicyRepository(RequestContext c, IRepositoryStrategy <Data.EF.bvc_Policy> r,
                         IRepositoryStrategy <Data.EF.bvc_PolicyBlock> subr,
                         ILogger log)
 {
     context           = c;
     repository        = r;
     this.logger       = log;
     repository.Logger = this.logger;
     blockRepository   = new PolicyBlockRepository(c, subr, this.logger);
 }