public Repository(DbContextMain context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public UnitOfWork(DbContextMain dbContext) { _dbContext = dbContext; }
public DbContextMain Get() => dataContext ?? (dataContext = new DbContextMain(_appSettings.Value.DefaultConnection));