Beispiel #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>();
 }
Beispiel #2
0
 public Repository(TransportationContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }