public EfOrderTrackingUnitOfWork() { #region Thread Safety Singleton using Double Check Locking if (_dbContext == null) { lock (padlock) { if (_dbContext == null) { _dbContext = new OrderTrackingContext(); Console.WriteLine("'_dbContext' nesnesi oluştu"); } } } #endregion _efStokDal = null; // Buradan istediğiniz gibi EntityFramework'ü konfigure edilebilir. //_dbContext.Configuration.LazyLoadingEnabled = false; //_dbContext.Configuration.ValidateOnSaveEnabled = false; //_dbContext.Configuration.ProxyCreationEnabled = false; }
public EfStokRepository(OrderTrackingContext dbContext) : base(dbContext) { }
public EfOrderTrackingGenericRepositoryBase(OrderTrackingContext dbContext) { //_dbContext = new TContext(); _dbContext = dbContext; _dbSet = _dbContext.Set <TEntity>(); }