I am getting this error - {"The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance."} System.Exception {SD.LLBLGen.Pro.ORMSupportClasses.ORMEntityOutOfSyncException}
when I think my save does refetch entity object from database.
DataStandardEntity dse = new DataStandardEntity();
dse.ClinDataStdNm = r[0].ToString();
dse.ClinDataStdDesc = r[1].ToString();
dse.OdsLoadDate = DateTime.Now;
dse.OdsUpdateDate = DateTime.Now;
dse.SrcCreateDate = DateTime.Now;
dse.SrcSysId = -1;
dse.SrcDeleteInd = "N";
dse.SrcCreateDate = DateTime.Now;
dse.SrcUpdateDate = DateTime.Now;
_dataStandards.Add(dse);
_adapter.SaveEntity(dse, true, true);
exception is thrown when I call "dse.ClinDataStdNm" after the above code snippet.
Could you please tell me what I am doing wrong?
Thanks,
S