Currently, it looks like AsScalarAsync can only be used with IEntityQuery<T>s. I'm trying to find a way to use it for an ITypedQuery that was created dynamically. For example, the following code works fine:
var q1 = em.GetQuery<User>();q1.AsScalarAsync().Count(CallbackMethod); |
But I want the query's type to be dynamic. This is the code I want to write but can't:
var type = typeof (User);//In the real use, this type won't be hardcodedvar q2 = EntityQuery.Create(type); q2.AsScalarAsync().Count(CallbackMethod); //Error: AsScalarAsync can't be used on q2. |
Are there any plans to support AsScalarAsync for ITypedQueries? Or will I need to do some tricky reflection/casting to get this to work?
Thanks,
-Stephen