Пример #1
0
 public virtual void Update(T entity)
 {
     context.Set <T>().Attach(entity);
     context.Entry(entity).State = EntityState.Modified;
 }
Пример #2
0
 public GenericRepository(DevHubContext context)
 {
     this.context = context;
     dbset        = context.Set <T>();
 }