public virtual async Task <T> GetByIdAsync(int id) { return(await _dbContext.Set <T>().FindAsync(id)); }
public BaseRepository(TaskManagerDbContext context) { _context = context; _dbSet = context.Set <TEntity>(); }
public async Task Add(T entity) { _context.Set <T>().Add(entity); await _context.SaveChangesAsync(); }