Hi all I am doing something like this -
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();
}
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.