public void Update(T obj)
 {
     table.Attach(obj);
     db.Entry(obj).State = EntityState.Modified;
 }