public virtual async Task <TEntity> GetByIdAsync(TKey id) { Expression <Func <TEntity, bool> > predicate = t => t.Id.ToString() == id.ToString(); return(await _context.Set <TEntity>().FirstOrDefaultAsync(predicate)); }
public RepositoryBase(GasStationContext context) { _context = context; _db = _context.Set <TEntity>(); }