My position is far away below you at this time.
I can still using the Excel Importer which allow my users to import data even if it's not new to be updated.
After the importation i can run the following code :
foreach (var entity in this.Formations)
if (entity.Details.EntityState == EntityState.Added)
var propertyName = entity.Titre;
var exists = (this.DataWorkspace.Optic2000Data.Formations.Where((x) => x.Titre == propertyName).FirstOrDefault() != null);
Formation existing = this.DataWorkspace.Optic2000Data.Formations.Where((x) => x.Titre == propertyName).FirstOrDefault();
if (exists == true)
existing = entity; // HOW TO UPDATE THIS ?
(Sorry for the code like this)
So i get my new entry (entity) which is at the end an Update. I have my old entry (existing).
How can i "force" the update of the old entry with the value of the new entry ?
Because I can use : this.DataWorkspace.AppData.SaveChanges() as i find my new entries with the status EntityState.Added.
If anyone has any idea