<?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 : Refreshing Entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Refreshing Entity</description>
  <pubDate>Mon, 13 Apr 2026 17:34:12 -700</pubDate>
  <lastBuildDate>Thu, 13 Jan 2011 09:48:57 -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=2435</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>Refreshing Entity : hi.You can try this (without using...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2435&amp;PID=9640#9640</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=825" rel="nofollow">gkneo</a><br /><strong>Subject:</strong> 2435<br /><strong>Posted:</strong> 13-Jan-2011 at 9:48am<br /><br />hi.<div><br></div><div>You can try this (without using RefetchEntitiesAsync). &nbsp;the variable myCollection is IEnumerable</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>var query= myCollection.Cast&lt;MyEntityType&gt;().ToQuery().Include("PropertyName1").Include("PropertyName2");</div><div><br></div><div>query.ExecuteQueryAsync( args=&gt;</div><div>{</div><div>if (args.HasError) //show error</div><div><br></div><div>})</div><div><br></div><div><br></div><div>//or &nbsp;you can use</div><div>myEntityManager.ExecuteQueryAsync(query, args=&gt;</div><div>{</div><div>if (args.HasError) //show error</div><div>}</div><div>);</div><div></pre></td></tr></table></div><div><br></div><div><br></div><div>As you will notice, the query contains a &nbsp;"where" clause which includes all the pks of the entities in your list. As the entities are loaded into the entity manager cache, &nbsp;myCollection's entities will be updated accordingly, so you don't need to do anything when the executeQueryAsync gets completed.</div><div><br></div><div>Regards,</div><div><br></div><div>Guillermo</div>]]>
   </description>
   <pubDate>Thu, 13 Jan 2011 09:48:57 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2435&amp;PID=9640#9640</guid>
  </item> 
  <item>
   <title>Refreshing Entity : Good Morning,  I have what I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2435&amp;PID=9639#9639</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1019" rel="nofollow">jipock</a><br /><strong>Subject:</strong> 2435<br /><strong>Posted:</strong> 13-Jan-2011 at 8:07am<br /><br /><P>Good Morning, </P><DIV>I have what I think is a simple question. </DIV><DIV>&nbsp;</DIV><DIV>I have a collection of entities that are already created. However, I need to do some sort of a refresh on this collection from the database. I can (and do) use the RefreshEntitiesAsync() function. However,&nbsp;when I refresh the entities, I need to add an 'Include'&nbsp;to include two more navigation entity properties&nbsp;that were not in the original entities. Ordinarily, if I were doing a query, I'd simply use the Include("XXX") path, but I don't see where refresh lets me do that. </DIV><DIV>&nbsp;</DIV><DIV>Can anyone offer a suggestion?</DIV>]]>
   </description>
   <pubDate>Thu, 13 Jan 2011 08:07:27 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2435&amp;PID=9639#9639</guid>
  </item> 
 </channel>
</rss>