<?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 : Cast string to IEntityQuery</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Cast string to IEntityQuery</description>
  <pubDate>Sat, 11 Apr 2026 18:58:46 -700</pubDate>
  <lastBuildDate>Sun, 23 Aug 2009 22:58:11 -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=1383</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>Cast string to IEntityQuery : Fantastic! That will be very powerful....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5232#5232</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=470" rel="nofollow">bigfish</a><br /><strong>Subject:</strong> 1383<br /><strong>Posted:</strong> 23-Aug-2009 at 10:58pm<br /><br />Fantastic!&nbsp; That will be very powerful.&nbsp; Will look to work this into my app in Sept when released.&nbsp; ]]>
   </description>
   <pubDate>Sun, 23 Aug 2009 22:58:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5232#5232</guid>
  </item> 
  <item>
   <title>Cast string to IEntityQuery : DevForce 5.2.2, due the first...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5229#5229</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1383<br /><strong>Posted:</strong> 23-Aug-2009 at 5:34pm<br /><br />DevForce 5.2.2, due the first week of September, will include a new PredicateDescription class which will allow you to dynamically build predicates and create a filtered query.&nbsp; Here's a sample - <DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var expr1 = PredicateBuilder.Make(typeof(Product), "UnitPrice", FilterOperator.IsGreaterThanOrEqualTo, 24);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var expr2 = PredicateBuilder.Make(typeof(Product), "Discontinued", FilterOperator.IsEqualTo, true);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var query = PredicateBuilder.FilterQuery(_entityManager.Products, expr1.And(expr2));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var results = _entityManager.ExecuteQuery&lt;Product&gt;((IEntityQuery&lt;Product&gt;)query);<BR></pre></td></tr></table></DIV><DIV><FONT size=3><FONT face=Calibri><o:p></o:p></FONT></FONT>&nbsp;</DIV>]]>
   </description>
   <pubDate>Sun, 23 Aug 2009 17:34:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5229#5229</guid>
  </item> 
  <item>
   <title>Cast string to IEntityQuery : I forgot to mention, although...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5017#5017</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1383<br /><strong>Posted:</strong> 23-Jul-2009 at 2:43pm<br /><br />I forgot to mention, although it may not help you here, that there's a new PredicateBuilder in DevForce 5.2.1 which, once you've got your search criteria expression(s), allows you to easily AND and OR them.]]>
   </description>
   <pubDate>Thu, 23 Jul 2009 14:43:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5017#5017</guid>
  </item> 
  <item>
   <title>Cast string to IEntityQuery : Unfortunately it&amp;#039;s not possible...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5014#5014</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 1383<br /><strong>Posted:</strong> 23-Jul-2009 at 2:28pm<br /><br />Unfortunately it's not possible to convert a string into an EntityQuery.&nbsp; In a near future release we'll be adding some sort of filtering support to the ObjectDataSource which will do something very similar to what you need, and it looks like we should make this filtering capability a standalone feature and not buried solely within the ODS.<DIV>&nbsp;</DIV><DIV>For right now, a few options to consider - </DIV><DIV>&nbsp;</DIV><DIV>1) Use a PassthruEsqlQuery instead of an EntityQuery&lt;T&gt;.&nbsp;&nbsp; Since you're able to easily create a search request string it's not too involved to turn it into Entity SQL.&nbsp; Note that these queries always use a DataSourceOnly fetch strategy.</DIV><DIV>&nbsp;</DIV><DIV>2) If you're comfortable with LINQ Expressions, you can use the EntityQuery&lt;T&gt; constructor which accepts an Expression, which you've built up for the search request.&nbsp; This is actually how DevForce will implement this.&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 23 Jul 2009 14:28:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=5014#5014</guid>
  </item> 
  <item>
   <title>Cast string to IEntityQuery : Is it possible to cast this string...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=4995#4995</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=470" rel="nofollow">bigfish</a><br /><strong>Subject:</strong> 1383<br /><strong>Posted:</strong> 22-Jul-2009 at 12:38am<br /><br />Is it possible to cast this string as an IEntityQuery:&nbsp; Manager.Employee.Where(e =&gt; e.LastName == "Fuller")<DIV>&nbsp;</DIV><DIV>EntityManager Manager is already defined.</DIV><DIV>&nbsp;</DIV><DIV>Why am I need to do this?</DIV><DIV>&nbsp;</DIV><DIV><img src="http://www.ideablade.com/forum/uploads/470/Search.png" height="58" width="516" border="0" /></DIV><DIV>&nbsp;</DIV><DIV>I'd like to be able to offer the option to users for searching records, where the object property to search on is user controlled, as is the search filter type.&nbsp; I've quite easily created the string result&nbsp;for their search request, now would simply like to cast that as IEntityQuery to pass into <FONT size=2>EntityManager.ExecuteQueryASynch.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Any help, advice on a "better way",&nbsp;or pointers to samples much appreciated.</FONT></DIV>]]>
   </description>
   <pubDate>Wed, 22 Jul 2009 00:38:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1383&amp;PID=4995#4995</guid>
  </item> 
 </channel>
</rss>