I have this in my repository and it works as expected:

```
public virtual EntityClass GetById(int id)
{
    return db.Set<EntityClass>().Find(id);
}

```

However, I have some tables with either too many columns (example: 10 columns where I need only 3 out of them) or some tables where I have long text in there and again, they dont need to be fetched.

I was thinking if there is a way to still search by the primary key but perhaps getting an IQueryable result? Or at least something that could allow me to do something like this:

```
var blah = myRepo.GetById(myId).Select(s => new {column 2, column 3, column 7})

```