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

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

            result = new OrderNoteRepository(new EntityFrameworkRepository <Data.EF.bvc_OrderNote>(
                                                 new Data.EF.EntityFrameworkDevConnectionString(c.ConnectionStringForEntityFramework)), logger);
            return(result);
        }
Пример #3
0
 private OrderRepository(RequestContext c,
                         IRepositoryStrategy <Data.EF.bvc_Order> r,
                         IRepositoryStrategy <Data.EF.bvc_LineItem> itemr,
                         IRepositoryStrategy <Data.EF.bvc_OrderNote> noter,
                         IRepositoryStrategy <Data.EF.bvc_OrderCoupon> couponr,
                         IRepositoryStrategy <Data.EF.bvc_OrderPackage> packager,
                         ILogger log)
 {
     context           = c;
     repository        = r;
     this.logger       = log;
     repository.Logger = this.logger;
     itemRepository    = new LineItemRepository(itemr, this.logger);
     notesRepository   = new OrderNoteRepository(noter, this.logger);
     couponRepository  = new OrderCouponRepository(couponr, this.logger);
     packageRepository = new OrderPackageRepository(packager, this.logger);
 }