Sample repository class
If you're worried about repeating Context.Set&lt;TEntity&gt;() about the place, you can assign a field in your constructor instead:

public class Repository&lt;TEntity&gt; : IRepository&lt;TEntity&gt; where TEntity : class
{
    protected readonly DbContext Context;
    protected readonly IDbSet&lt;TEntity&gt; Set;

    public Repository(DbContext context)
    {
        Context = context;
        Set = context.Set&lt;TEntity&gt;();
    }

    public TEntity Get(int id)
    {
        return Set.Find(id);
    }
}


I would say that I don't generally like generic repositories but I won't get in to that now. A lot of people use the pattern and I don't know of any canonical 'this is bad' sources so am happy to disagree over it.

One thing you do need to consider though: multiple column primary keys. That's why Find takes an array (params). You're making a method that will throw if the object has a multiple column primary key (Get).