How is your EnityManager being created? The latest TempHire uses an unmodified EntityManagerProvider and the out-of-the-box fake ConnectionOptions:
[Export]
public IEntityManagerProvider<TempHireEntities> TempHireEntityManagerProvider
{
get
{
var provider = new EntityManagerProvider<TempHireEntities>();
#if FAKESTORE
provider.Configure(config => config.WithConnectionOptions(ConnectionOptions.Fake.Name));
#endif
return provider;
}
}
Then on the server it injects the FakeLoginManager into the existing fake CompositionContext:
public class CompositionContextResolver : ICompositionContextResolver
{
private static readonly CompositionContext TempHireFake = CompositionContext.Fake
.WithGenerator(typeof(FakeLoginManager))
.WithName(CompositionContext.Fake.Name);
#region ICompositionContextResolver Members
public CompositionContext GetCompositionContext(string compositionContextName)
{
// Overwriting the default fake composition context.
if (compositionContextName == CompositionContext.Fake.Name)
return TempHireFake;
return null;
}
#endregion
}
Thanks to a bug fix in DF 6.1.7, this much simpler approach now works n-tier as well, if you just want to add a few things to an existing out-of-the-box CompositionContext.
What's different in your app? Perhaps the bug fix had an unintentended side effect. Are you hooking into any EM events outside of the EntityManagerDelegate?