Attach and Detach

Aug 23, 2015 at 8:30 PM
How can i detach a entity from session and Attach it to another?

the IEntitySession dos not habe any method to attach

Aug 24, 2015 at 1:46 AM

You should cast session to EntitySession class, then you d find these methods

Aug 24, 2015 at 2:14 AM
Can you give a Example?

Aug 24, 2015 at 9:37 PM
var session1 = app.OpenSession();
var session2 = app.OpenSession();
var pers = session1.GetEntity<IPerson>(someid);
// attach to different session now
var entSession2 = (EntitySession)session2;
var persRec = EntityHelper.GetRecord(pers);