<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Modifying query results in EntityServerQueryInterceptor</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Modifying query results in EntityServerQueryInterceptor</description>
  <pubDate>Mon, 13 Apr 2026 16:14:16 -700</pubDate>
  <lastBuildDate>Sun, 13 Mar 2011 22:06:43 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2541</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Modifying query results in EntityServerQueryInterceptor : Following up. I found what I was...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10162#10162</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=704" rel="nofollow">mikewishart</a><br /><strong>Subject:</strong> 2541<br /><strong>Posted:</strong> 13-Mar-2011 at 10:06pm<br /><br />Following up.&nbsp; I found what I was looking for in the 6.0.3 release notes.<br><font color="#0000cc"><br>Added QueriedEntities collection to EntityServerQueryInterceptor. &#091;1374&#093; <br><br>Now you can examine queried entities on the server before they are sent to the client. You could record what was queried for audit purposes (“What returns has a tax preparer tried to view?”). You can write fine-grained authorization logic to prevent transmission to client of forbidden entities … in case they slip past a protective query filter you added before the query was processed. <br><br>You cannot add or remove entities to the collection (yet). You can modify the entities (e.g., obscure the Social Security Number) before they continue on their way to the client. But be careful, especially if you expect the user to be able to update these entities and save them later!<br></font><br>This worked great!&nbsp; I hope to see adding/removing entities from the result set sometime in the near future.&nbsp; This would be helpful as well.<br><br>PS, in my earlier post I mistakenly wrote &#091;DataContract&#093; rather than &#091;DataMember&#093;.&nbsp; This has been fixed.<br>]]>
   </description>
   <pubDate>Sun, 13 Mar 2011 22:06:43 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10162#10162</guid>
  </item> 
  <item>
   <title>Modifying query results in EntityServerQueryInterceptor : Using Projection may be a better...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10100#10100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2541<br /><strong>Posted:</strong> 03-Mar-2011 at 3:57pm<br /><br />Using Projection may be a better approach:<br><br>http://drc.ideablade.com/xwiki/bin/view/Documentation/CookbookSimpleProjection<br><span style="font-size:10px"><br /><br />Edited by smi-mark - 03-Mar-2011 at 3:59pm</span>]]>
   </description>
   <pubDate>Thu, 03 Mar 2011 15:57:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10100#10100</guid>
  </item> 
  <item>
   <title>Modifying query results in EntityServerQueryInterceptor : Thanks smi-mark, that&amp;#039;s an...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10099#10099</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=704" rel="nofollow">mikewishart</a><br /><strong>Subject:</strong> 2541<br /><strong>Posted:</strong> 03-Mar-2011 at 12:39pm<br /><br />Thanks smi-mark, that's an interesting idea.&nbsp; It doesn't help with the entities in two dbs.&nbsp; This also seems to only work if the entities share a common key (such as sub-typing).<br>]]>
   </description>
   <pubDate>Thu, 03 Mar 2011 12:39:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10099#10099</guid>
  </item> 
  <item>
   <title>Modifying query results in EntityServerQueryInterceptor :  I think perhaps a better approach...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10098#10098</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 2541<br /><strong>Posted:</strong> 03-Mar-2011 at 12:31pm<br /><br />I think perhaps a better approach would be to look at doing it from the edmx.<br><br>This link may help: <a href="http://msdn.microsoft.com/en-us/library/cc716698.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/cc716698.aspx</a><br><br><br><span style="font-size:10px"><br /><br />Edited by smi-mark - 03-Mar-2011 at 12:32pm</span>]]>
   </description>
   <pubDate>Thu, 03 Mar 2011 12:31:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10098#10098</guid>
  </item> 
  <item>
   <title>Modifying query results in EntityServerQueryInterceptor :   We have some cases where we&amp;#039;d...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10097#10097</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=704" rel="nofollow">mikewishart</a><br /><strong>Subject:</strong> 2541<br /><strong>Posted:</strong> 03-Mar-2011 at 11:10am<br /><br />We have some cases where we'd like to improve performance.&nbsp; To achieve this what I'd like to do is add a couple commonly queried data to the Entity and flag them as &#091;DataMember&#093;.<br><br>Using a Northwind analogy, pretend there's no FK between Orders and Customers, or Customers is in a separate database and consider the queries:<br><br>var order = Orders.First(o =&gt; o.OrderID == 10248)<br>Customers.Where(c =&gt; c.CustomerId == order.CustomerId)<br><br>We could add a CustomerName property to the Order entity partial class to avoid the second query, if it could be updated in the EntityServerQueryInterceptor.<br><br>&nbsp;&nbsp;&nbsp; protected override bool ExecuteQuery()<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var result = base.ExecuteQuery();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (result)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Get QueryResults<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //find all Orders being returned<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Query all Customers for Orders.CustomerId<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //Update the Order.CustomerName on each Order for the matching Customer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return result;<br>&nbsp;&nbsp;&nbsp; }<br><br>Am I looking in the right place to do this?&nbsp; Any examples of how to do this?<br><br>Thanks!<br><span style="font-size:10px"><br /><br />Edited by mikewishart - 13-Mar-2011 at 10:07pm</span>]]>
   </description>
   <pubDate>Thu, 03 Mar 2011 11:10:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2541&amp;PID=10097#10097</guid>
  </item> 
 </channel>
</rss>