This is the equivalent of an ObjectContext:
this.dbSet = context.CreateObjectSet<TEntity>();
Now it creates ObjectSet<TEntity>, not DbSet<TEntity>, but for your template you can use it in the same way.
UPDATE
The class ObjectSetdoes not have a utility method that matches the method Find()for DbSet. In order to get by key you had to build EntityKeyand use ObjectContext.GetEntityByKey(), unfortunately, this is not a very simple thing to do.
There is really no easy way to handle this that I found. In my case, what I did was to base all my entities from a common class (using custom T4 templates to generate classes from the model). And then I can add a general restriction to my repositories, for example:
public class MyRepository<TEntity> where TEntity : MyEntityBaseClass
Id, , :
return myObjectSet.SingleOrDefault(x => x.Id == myId);
, , .