I have a LINQ datacontext and a ObservableCollection holding records for a Companys table in SQL
Changes to the current records and new records made to the current datacontext (DataDC) are reflected when I do a
DataDC.SubmitChanges();
However if I have another Window with a separate DataContext to the same tables, if I modify fields for records that currently exist in both DataContexts (ie Company Name modified) these changes are seen when I do a
DataDC.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues, Companys);
However if the OTHER window/datacontext created a new record or if I use SQL explorer to create a new record, these new records do not show in the DataContext.Company table even after a
DataDC.Refresh(System.Data.Linq.RefreshMode.OverwriteCurrentValues, Companys);
I've tried different Modes.
So why doesn't a .Refresh(....) Load new records, but will reflect changes made to records that exist?
Am I missing something?
I can't see a way to just refresh the DC with completely all new data from the SQL tables?