c# - SaveChanges doesn't do anything using LINQ Entities over OData -
in cases have been able trick detecting change using updateobject:
public updateorderdescription(int userid) { var entities = new databaseentities(new uri("http://someserver/orderservice.svc")) { useposttunneling = true}; var order = (from o in entities.orders o.userid == userid select o).single(); order.description = "hello"; entities.updateobject(order); entities.savechanges(); }
but doesn't work when using many-to-many relationship using navigation properties, since can not perform updateobject on navigation property.
take @ article: http://msdn.microsoft.com/en-us/library/dd756361.aspx
in short client library wcf ds needs notified changes want make. default done using updateobject, setlink, addlink , similar methods on context.
Comments
Post a Comment