示例#1
0
 public Repository(DbContextMain context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
示例#2
0
 public UnitOfWork(DbContextMain dbContext)
 {
     _dbContext = dbContext;
 }
示例#3
0
 public DbContextMain Get() => dataContext ?? (dataContext = new DbContextMain(_appSettings.Value.DefaultConnection));