views:

135

answers:

1

When one is using ADO.NET Data Services and consuming it via the Linq to REST (formerly Project Astoria), it doesn't seem to be as intuitive as it could be.

Namely, with normal Linq to SQL, the DataContext monitors objects and tracks changes, so a simple SubmitChanges() call will actually submit all my changes.

But with Linq to REST, I have to call UpdateObject(entity) in order to notify the DataContext that the entity is dirty.

What's the point in this? Or am I missing something? Why not just have the autogenerated classes implement INotifyPropertyChanged and track changes like Linq to SQL?

+1  A: 

In 3.5 SP1 release, we didn't have this feature. But in the next release, both astoria 1.5 CTP2 and Dev10 beta2, we have the option to generate classes that implement INotifyPropertyChanged, and in those cases, one doesn't need to call UpdateObject.

If you are using VS to generate the classes, then in dev10, this option is on by default. But for 3.5 SP1, you will have to use manual turn this option.

Please let me know if you need more information on this.

For CTP2 bits, here's the link: http://blogs.msdn.com/astoriateam/archive/2009/08/31/ado-net-data-services-v1-5-ctp2-now-available-for-download.aspx

Thanks Pratik

Pratik Patel
So, in short, the actual answer to my question is "because we didn't do it"?
JustLoren
Yep , we didnt implement automatic change tracking in the 3.5 Sp1 release.
Phani Raj