示例#1
0
 public GenericRepository(DbContextOptions <ForumDbContext> dbContextOptions)
 {
     _context = new ForumDbContext(dbContextOptions);
     table    = _context.Set <T>();
 }
示例#2
0
 public BaseRepository(ForumDbContext dbContext)
 {
     _dbContext = dbContext;
     _dbSet     = dbContext.Set <T>();
 }
示例#3
0
 public RepositoryBase(ForumDbContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }