Ejemplo n.º 1
0
 public TEntity GetByID(Int64 id)
 {
     // Here we are working with a DbContext, not PlutoContext. So we don't have DbSets
     // such as Courses or Authors, and we need to use the generic Set() method to access them.
     return(Context.Set <TEntity>().Find(id));
 }
Ejemplo n.º 2
0
 public Repositories(sbv_uuwebstoreEntities context)
 {
     this.Context = context;
     this.DbSet   = context.Set <TEntity>();
 }