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