I found something strange. Let's say I have a Car model and a Company model.
So, my Car model has a CompanyId string.
Say I changed the CompanyId Car , then I SubmitChanges in the DataContext .
Here is my problem: Updated CompanyId of my Car model. But the attitude of Car.Company is NOT.
So, if I change Car.CompanyId from 1 to 2. Then, outputting Car.Company.CompanyId , it will display 1 instead of 2.
So my question is: is there a way to update EVERYTHING in a DataContext?
I am currently using:
public void RefreshCollection() {
Refresh my collection.
and
private void sauvegarderToolStripMenuItem_Click(object sender, EventArgs e) { purchaseOrder.OrderDate = orderDate.Value; purchaseOrder.RequiredDate = requiredDate.Value; purchaseOrder.ShipTo = shipTo.Text; purchaseOrder.State = helper.ConvertComboBoxIndexToStateIndex( stateKey.SelectedIndex);
Submit your changes.
source share