Hi,
I'm trying to get the EntityManager for the current Query (e.Query.EntityManager) and it always return null. I want to use the DataSourceExtension to identify the current tenant so that I can "correct" the filter criteria. I don't know if it could be related to the fact that the call is done async from silverlight or something else. EntityManager.DefaultManager also does not work. It returns a EntityManager but for some reason it is always te wrong DataSourceExtention (seems cached or something, sometimes "" and sometimes the same as the default startup).
I checked on the client, it does not make a difference if I call Query.ExecuteAsync<T> or EntityManager.ExecuteQueryAsync<T>, both results in the server Query.EntityManager being null and the DataSourceExtention is 100% correct on the client.
Any Ideas?
Is there another way to get the EntityManager in the OnFetching server event.
Regards,
Francois