public BaseRepository(BlogerDbContext context)
 {
     _dbContext = context ?? throw new ArgumentNullException(nameof(context));
     _dbSet     = context.Set <TEntity>();
 }
Exemple #2
0
 public static BaseRepository <TEntity> CreateRepository <TEntity>(BlogerDbContext dbContext)
     where TEntity : class, new() =>
 new BaseRepository <TEntity>(dbContext);