I have a WPF4 application i have 1 window which editing data :
main mn = db.mains.Single(p => p.ID == mID);
mn.Type = cbTypes.Text;
mn.Sum = Convert.ToDecimal(txtSum.Text);
mn.Datetime = datePicker1.SelectedDate.Value;
mn.Reason = txtReason.Text;
db.SubmitChanges();
this.DialogResult = true;
this.Close();
after this closing window i have this:
if (ed.DialogResult)
{
var dat = (from d in db.mains select d).ToList();
this.GetData();
}
but dat is not filling with updated data(tried with debugger).
I tried same thing in edit window and its working correctly.
Try a Refresh on the entities before you pull them down again: