Hi to all!
I want to insert row into table using linq. I wrote this code
var db = ((Table<PersonAddress>)personAddressBindingSource.DataSource);
db.InsertOnSubmit(new PersonAddress { Address = "abc", PersonId = 5 });
DataGridView connected to personAddressBindingSource. but when run above code, dataGridView not show new row before call SubmitChanges();
Also grid not refresh after call SubmitChanges(), but when get data again from db it's ok by this code
DataClasses1DataContext db = new DataClasses1DataContext();
personAddressBindingSource.DataSource = db.PersonAddresses;
Could you please help me.
Thanks