I'm adding an object to another object like so:
Foo foo = new Foo();
AnotherClass.bar.add(foo); // bar is getting assigned with dependency injection in AnotherClass
This causes a DevExpress.Xpo.Exceptions.SessionMixingException as follows:
Initialization method Test.SetUp threw exception. DevExpress.Xpo.Exceptions.SessionMixingException: DevExpress.Xpo.Exceptions.SessionMixingException: The 'Foo' object belongs to a different session.
How does one grab get a hold of the session from AnotherClass to avoid this error?