<?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 : EntityReferenceBase.Load within a coroutine</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : EntityReferenceBase.Load within a coroutine</description>
  <pubDate>Sun, 12 Apr 2026 16:52:47 -700</pubDate>
  <lastBuildDate>Tue, 30 Nov 2010 12:23:04 -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=2327</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>EntityReferenceBase.Load within a coroutine : Hi bebe,   Unfortunatelly, you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2327&amp;PID=9280#9280</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2327<br /><strong>Posted:</strong> 30-Nov-2010 at 12:23pm<br /><br />Hi bebe, <DIV>&nbsp;</DIV><DIV>Unfortunatelly, you won't be able to accomplish that with EntityReferenceBase.Load in a coroutine.</DIV><DIV>&nbsp;</DIV><DIV>Is there any particular reason you are using <FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>EntityReferenceBase.Load</FONT></FONT> instead of <FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>EntityRelationQuery</FONT></FONT>? </DIV><DIV>You'll be able to&nbsp;complete the same task using <FONT size=2 face=C&#111;nsolas>EntityRelationQuery</FONT>&nbsp;with the plus of being able to use it in a coroutine.</DIV><DIV>&nbsp;</DIV><DIV>For instance:</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT size=2 face=C&#111;nsolas>&nbsp; ...</FONT></DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> regionERQuery = </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityRelationQuery</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>(territory, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>EntityRelations</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.FK_Territory_Region.ToRole2Link);</DIV><DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> regionQuery = regionERQuery</FONT></FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; .With(myQueryStrategy)</FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&nbsp; &nbsp; .ExecuteAsync();</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; yield</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>return</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> regionQuery;</FONT></FONT></DIV></DIV><DIV><FONT size=2 face=C&#111;nsolas>&nbsp; ...</FONT></DIV><DIV><FONT size=2 face=C&#111;nsolas></FONT>&nbsp;</DIV><DIV>Regards,</DIV><DIV>&nbsp;&nbsp; sbelini.</DIV>]]>
   </description>
   <pubDate>Tue, 30 Nov 2010 12:23:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2327&amp;PID=9280#9280</guid>
  </item> 
  <item>
   <title>EntityReferenceBase.Load within a coroutine : I use manager.UseAsyncNavigation...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2327&amp;PID=9189#9189</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=678" rel="nofollow">bebe</a><br /><strong>Subject:</strong> 2327<br /><strong>Posted:</strong> 22-Nov-2010 at 5:16am<br /><br />I use <font face="Courier New, Courier, mono"><br>manager.UseAsyncNavigation = true</font>;<br><font face="Courier New, Courier, mono">manager.DefaultQueryStrategy = QueryStrategy.CacheOnly</font>;<br><br>and call<br><font face="Courier New, Courier, mono">EntityReferenceBase.Load(MergeStrategy mergeStrategy)</font> to  load a related entity. <br><br>In NorthwindDB this could look like:<br><br><font face="Courier New, Courier, mono">var reference = Territory.PropertyMetadata.Region.GetEntityReference(territory);<br>reference.Load(MergeStrategy.PreserveChanges);</font><br><br> I would like to do this within a coroutine. How can I get informed that the operation is completed (e.g. the Region of the Territory is loaded)?<br><br>It would be great if <font face="Courier New, Courier, mono">EntityReferenceBase.Load(...)</font> would return a <font face="Courier New, Courier, mono">INotifyCompleted</font>. Are there any plans for this feature?<br><br><br>]]>
   </description>
   <pubDate>Mon, 22 Nov 2010 05:16:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2327&amp;PID=9189#9189</guid>
  </item> 
 </channel>
</rss>