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