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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -