protected RepositoryBase(IDbContextFactory contextFactory) { if (contextFactory == null) { throw new ArgumentNullException("contextFactory"); } ContextFactory = contextFactory; //Context.Configuration.ProxyCreationEnabled = false; Context.Configuration.LazyLoadingEnabled = true; _dbSet = Context.Set <T>(); }
public UserRepository(ApplicationDbContext context) { _context = context; _ApplicationUsers = _context.Users; }
protected RepositoryBase(IDatabaseFactory databaseFactory) { DatabaseFactory = databaseFactory; _dbset = DataContext.Set <T>(); }