title: How to update a record without selecting that record again in ADO.NET Entity Framework?
body: <p>Hi all I am doing something like this - </p>
  
  <pre><code>void update(ClasstoUpdate obj)//obj is already having values to update...
  {
    var data= (from i in Entityobject.ClasstoUpdate 
              where obj.Id==i.Id
              select i).FirstorDefault();
    data.Name="SomeCoolName";
    EntityObject.SaveChanges();
  }
  </code></pre>
  
  <p>I want to perform an update without again querying using the Id,is there any way I just pass the updated object to ADO.NET Entity framework and it updates it.I am sorry if I am missing something here but this is the way i have been doing it wondering if there is a simple way to update. Thanks.</p>