Ejemplo n.º 1
0
 /// <summary>
 /// The constructor accepts a database context instance and initializes the entity set variable
 /// </summary>
 /// <param name="context"></param>
 public GenericRepository(TransportationContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
Ejemplo n.º 2
0
 public Repository(TransportationContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }