public GenericRepository() { this._context = ApplicationDbContext.doGetDbContext(); var objectContext = ((System.Data.Entity.Infrastructure.IObjectContextAdapter) this._context).ObjectContext; this._entity = objectContext.CreateObjectSet <T>(); this.EnableLazyLoading = false; }