Example #1
0
        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>();
        }
Example #2
0
 public UserRepository(ApplicationDbContext context)
 {
     _context          = context;
     _ApplicationUsers = _context.Users;
 }
Example #3
0
 protected RepositoryBase(IDatabaseFactory databaseFactory)
 {
     DatabaseFactory = databaseFactory;
     _dbset          = DataContext.Set <T>();
 }