Hi;
How can I getting the real primary key value after SaveChanges. I’m using custom ID generater.
Please give me some example code.
This following code running properly, but I'm not sure is the best way.
private EntityList<HT_HESAPPLANI> mHPDetay ;
private int HPID;
aHESAPPLANI = HT_HESAPPLANI.Create(mPersMgr, "", "");
mHPDetay = new EntityList<HT_HESAPPLANI>();
mHPDetay.Add(aHESAPPLANI);
mHPDetayBS.DataSource = mHPDetay;
mPersMgr.SaveChanges(mHPDetay);
HPID = mHPDetay[0].ROWID;
PrimaryKey HpPK = new PrimaryKey(typeof(HT_VHESAPPLANI), HPID);
HT_VHESAPPLANI pEntityHP = (HT_VHESAPPLANI)mPersMgr.GetEntity(HpPK, QueryStrategy.DataSourceOnly);