public Repository(MagacinskoRobnoMaterijalnoDbContext dbContext) { this.dbContext = dbContext; dbSet = this.dbContext.Set <T>(); var objectDbContext = (this.dbContext as IObjectContextAdapter).ObjectContext; objectDbContext.CommandTimeout = 2000; }
/// <summary> /// Dispose object based on flag value /// </summary> /// <param name="disposing">Flag that indicates if disposing is in progress</param> protected virtual void Dispose(bool disposing) { if (disposing && dbContext != null) { dbContext.Dispose(); dbContext = null; } }
public DocumentRepository(MagacinskoRobnoMaterijalnoDbContext dbContext) : base(dbContext) { }