private void CreateDbContext() { this.DbContext = new OrderDbContext(); this.DbContext.Configuration.ProxyCreationEnabled = false; this.DbContext.Configuration.LazyLoadingEnabled = false; this.DbContext.Configuration.ValidateOnSaveEnabled = false; }
public ShoppingCartRepository(OrderDbContext dbContext) { this.dbContext = dbContext; this.scStoreRepo = new EFRepository<ShoppingCartStore>(dbContext); this.orderNumberRepo = new EFRepository<OrderNumber>(dbContext); }