Hi Denis!
Thanks for your help!
I implemented the solution "Named queryable and using the EntityServerQueryInterceptor" and it works. I assume that your ExecuteQuery-mehtod should rather look like this:
protected override bool ExecuteQuery() {
//calls base.ExecuteQuery to execute and returns results var baseQueryResult = base.ExecuteQuery();
//Do special calculations for your particular named query here if(baseQueryResult)
PerformAdditionalCalculationsToCustomerResults();
return baseQueryResult;
} |
Anyway, I'm not fully satisfied with this solution, as I'm force to tear one query into two parts. As the pattern of these queries is always the same (defaultquery + includes + where-constraint + entity-calculations) I was wondering, if I need the named query at all.
There is a Tag-property in every EntityQuery. Can I add a custom string value (eg: "ApplyCustomerCalculations") on the client as EntityQuery.Tag, check this Tag value on the server in the EntityServerQueryInterceptor.ExecuteQuery and start the same calculations? So I wouldn't need the named query, and everything stays in two places, not in three (means Client-Repository - ESQInterceptor and not Client-Repository - NamedQuery - ESQInterceptor).
Of course, overall, I'd prefer to be able to solve this in a named query only, so I'd rather hope this is a bug than a feature. ;)
Have a nice weekend
Roland
Edited by AuerRo - 13-Apr-2012 at 1:06am