I am trying following code, it has two parts, one is navigation via prism. When navigation is allowed I am starting a deep load asynchronously but each time with a new conte
This is probably not the answer, but a general look over your code.
Main purpose of async/await is, to keep the current Thread available. This helps not blocking the UI Thread and keeping your App responsive.
You are already making sure that your deep loading happens on a ThreadPool thread, because you are starting it entirely utilizing Task.Run(). You can probably get around most of your problems by using the default synchronous methods of EntityFramework in your loading mechanism.
In a first look, your code looks fine as of the async calls. Maybe your deep loading is triggered multiple times?
The problem is this code :
_unitOfWork = _UnitOfWorkFactory.createUnitOfWorkAsync();
IEnumerable<Relatie> relaties = await getRelatieAsync(_unitOfWork, relatieId).ConfigureAwait(true);
_relatieTypeTypes = await getRelatieTypeTypesAsync(_unitOfWork, relatieId).ConfigureAwait(true);
_relatie = relaties.FirstOrDefault();
_unitOfWork.Dispose();
the UnitOfWork is an instance variable, when the scenario starts a second time it is overwritten with a new instance. The already executing scenario then uses that new UnitOfWork instead of its own because it is overwritten. Not so easy to spot, but a simple race condition. I found it by replacing all instance variables by local variables and then the problem disappeared.