you mentioned a session closed error. are you trying to access the value
like
using(var session = factory.OpenSession())
{
var entity = session.Get<Entity>(id);
return entity.Parent.Id;
}
or
using(var session = factory.OpenSession())
{
var entity = session.Get<Entity>(id);
}
return entity.Parent.Id;
the first approach will work, then second would not. the scope of the
session matters.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/J4bYf3brY1UJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.