Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 public EfStokRepository(OrderTrackingContext dbContext) : base(dbContext)
 {
 }
Esempio n. 3
0
 public EfOrderTrackingGenericRepositoryBase(OrderTrackingContext dbContext)
 {
     //_dbContext = new TContext();
     _dbContext = dbContext;
     _dbSet     = _dbContext.Set <TEntity>();
 }