Hi, not quite sure where to put this but here goes.
I have the following code in my WPF client connecting to a DataService:
private EPODServiceReference.EPODEntities dsc =
new EPODServiceReference.EPODEntities(new Uri(Properties.Settings.Default.EPODServiceUri));
private DataServiceCollection<EPODServiceReference.DLN_DeliveryNotes> dln_DataServiceCollection;
dln_DataServiceCollection =
new DataServiceCollection<EPODServiceReference.DLN_DeliveryNotes>
(from d in dsc.DLN_DeliveryNotes
.Expand("COM_Companies")
.Expand("DRV_Drivers")
orderby d.DLNReference
select d);
dataGrid1.ItemsSource = dln_DataServiceCollection;
Running the app I can edit and save the changes back to my db and when the user wants to
cancel the unsaved changes in the DataServiceCollection I just run
dln_DataServiceCollection =
new DataServiceCollection<EPODServiceReference.DLN_DeliveryNotes>
(from d in dsc.DLN_DeliveryNotes
.Expand("COM_Companies")
.Expand("DRV_Drivers")
orderby d.DLNReference
select d);
again and the code executes but here is my confusion.
dln_DataServiceCollection still has the changes that was not saved?
Where are the changes being tracked and how can I cancel then?
Thanks.