Sorry for rambling a bit, I'm trying to figure out how to put my issue into words...
I'm trying to improve performance of my application a bit and have run into something really strange, perhaps someone else can help give me some insight.
I have a Silverlight app that I'm doing some dynamic queries with (so dynamic where clauses, group by, aggregate selects)
So I might have as an example:
var query = <some EntityQuery>.GroupBy(x => new { x.Foo, x.Bar }).Select(x => new { Key = x.Key, Agg = x.Sum(y => y.Baz));
But since it is all dynamic, I'm doing it with the AnonymousProjectionSelector.
Everything works fine and peachy most of the time... but here is the weird part.
Until I recycle the app pool.
Then I start getting this exception:
Caught exception: System.ArgumentException: Property
'_IB_DLP_pW9cXja0eElRI[System.String] Key' is not defined for type
'_IB_D78dbXbXUGgLyuM2[_IB_DLP_pW9cXja0eElRI[System.String],System.Nullable`1[System.Decimal]]'
at
IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.HandleException(Exception
e, PersistenceFailure failureType) at
IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.OnExecuteQuery() at
IdeaBlade.EntityModel.Server.EntityServerQueryInterceptor.Execute(IEntityQuery
entityQuery, SessionBundle sessionBundle, IEntityServer entityServer) at
IdeaBlade.EntityModel.Server.EntityServer.Fetch(SessionBundle sessionBundle,
IEntityQuerySurrogate surrogate) at SyncInvokeFetch(Object , Object[] , Object[]
) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance,
Object[] inputs, Object[]& outputs) at
System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&
rpc) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&
rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet)
Any thoughts on what could possibly cause this? It seems like a strange set of circumstances, but I can't figure out why it is happening only in that one (common) scenario...