예제 #1
0
 public BaseRepository(AirplaneContext context)
 {
     _context = context;
     DbSet    = _context.Set <TEntity>();
 }
예제 #2
0
 public Repository(AirplaneContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
예제 #3
0
 protected Repository(AirplaneContext context)
 {
     Db    = context;
     DbSet = Db.Set <TEntity>();
 }
예제 #4
0
 public void Insert(T obj)
 {
     context.Set <T>().Add(obj);
     context.SaveChanges();
 }