예제 #1
0
 public GenericRepository(RestauranteContext context)
 {
     _context = context;
     dataset  = _context.Set <T>();
 }
예제 #2
0
 public T Add(T entity)
 {
     _db.Set <T>().Add(entity);
     _db.SaveChanges();
     return(entity);
 }
예제 #3
0
 public BaseRepository(RestauranteContext context)
 {
     _db    = context;
     _dbSet = _db.Set <TEntity>();
 }