<?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 : Save ALL Data to Local Storage?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Save ALL Data to Local Storage?</description>
  <pubDate>Wed, 10 Jun 2026 19:11:37 -700</pubDate>
  <lastBuildDate>Fri, 07 Nov 2008 16:53:42 -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=981</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>Save ALL Data to Local Storage? : Thanks, Jeff, That worked well!Have...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3589#3589</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=92" rel="nofollow">HFloyd</a><br /><strong>Subject:</strong> 981<br /><strong>Posted:</strong> 07-Nov-2008 at 4:53pm<br /><br />Thanks, Jeff, <br><br>That worked well!<br><br>Have a great weekend!<br><br>Heather<br><br>]]>
   </description>
   <pubDate>Fri, 07 Nov 2008 16:53:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3589#3589</guid>
  </item> 
  <item>
   <title>Save ALL Data to Local Storage? : Well, I don&amp;#039;t know if it...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3586#3586</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=34" rel="nofollow">jeffdoolittle</a><br /><strong>Subject:</strong> 981<br /><strong>Posted:</strong> 07-Nov-2008 at 11:40am<br /><br />Well, I don't know if it would be such a good idea because this would pull down all of your data from your database in one fell swoop.&nbsp; Probably not very scalable.&nbsp; You could use reflection to find all entity types in your model by retrieving types that are sealed and that inherit from Entity.&nbsp; Alternatively you could just make a list of types you want to preload, which would be more strategic than just loading all data.<br><br>Example:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>public IEnumerable&lt;Type&gt; PreloadEntityTypes() {<br>&nbsp;&nbsp;&nbsp; var typeList = new List&lt;Type&gt;();<br>&nbsp;&nbsp;&nbsp; typeList.Add(typeof(ContactMethod));<br>&nbsp;&nbsp;&nbsp; typeList.Add(typeof(ContactMethodType));<br>&nbsp;&nbsp;&nbsp; /* etc */<br>&nbsp;&nbsp;&nbsp; return typeList;<br>}<br></pre></td></tr></table><br>]]>
   </description>
   <pubDate>Fri, 07 Nov 2008 11:40:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3586#3586</guid>
  </item> 
  <item>
   <title>Save ALL Data to Local Storage? :    Pardon my ignorance, but...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3582#3582</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=92" rel="nofollow">HFloyd</a><br /><strong>Subject:</strong> 981<br /><strong>Posted:</strong> 06-Nov-2008 at 3:06pm<br /><br />Pardon my ignorance, but how would I create the "entityTypes" array to pass in?<br>(I'm new to interfaces, etc)<br><br>What I would then like to do is something like this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>IEnumerable&lt;Type&gt; TypeList;<br><br>foreach (Type t in ~all the objects in my business model~)<br>{<br>&nbsp;&nbsp;&nbsp; TypeList.Add(t);<br>}<br></pre></td></tr></table><br><br>I know the syntax is way off for this, but perhaps you understand what I am getting at? <br><br>I noticed that the EntityClass object represents all the different objects in my model:<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; EntityList&lt;EntityClass&gt; melEC = new EntityList&lt;EntityClass&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; melEC = MainPm.Manager.GetEntities&lt;EntityClass&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (EntityClass ec in melEC&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~do something with the ec~<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br>I tried this:<br><table width="99%"><tr><td><pre class="BBcode"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach (EntityClass ec in melEC)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MainPm.Manager.GetEntities(ec.GetType());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br></pre></td></tr></table><br><br>but ec.GetType() always returns &lt;EntityClass&gt;, of course...<br><br>Any ideas?<br><br>Thanks, Heather<br><br><span style="font-size:10px"><br /><br />Edited by HFloyd - 06-Nov-2008 at 3:55pm</span>]]>
   </description>
   <pubDate>Thu, 06 Nov 2008 15:06:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3582#3582</guid>
  </item> 
  <item>
   <title>Save ALL Data to Local Storage? : It should work as you have it,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3552#3552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=34" rel="nofollow">jeffdoolittle</a><br /><strong>Subject:</strong> 981<br /><strong>Posted:</strong> 03-Nov-2008 at 7:15pm<br /><br />It should work as you have it, but there is no need to load the entities into lists.&nbsp; You should be able to simply do this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br><font face="Courier New, Courier, mono">public static void GetAllData () {<br>&nbsp;&nbsp;&nbsp; pm.GetEntities&lt;ContactMethod&gt;();&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; </font><font face="Courier New, Courier, mono">pm.</font><font face="Courier New, Courier, mono">GetEntities&lt;ContactMethodType&gt;();<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; </font><font face="Courier New, Courier, mono">pm.</font><font face="Courier New, Courier, mono">GetEntities&lt;</font><font face="Courier New, Courier, mono">HBType</font><font face="Courier New, Courier, mono">&gt;();<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; </font><font face="Courier New, Courier, mono">pm.</font><font face="Courier New, Courier, mono">GetEntities&lt;</font><font face="Courier New, Courier, mono">HouseholdBusiness</font><font face="Courier New, Courier, mono">&gt;();<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp; </font><font face="Courier New, Courier, mono">pm.</font><font face="Courier New, Courier, mono">GetEntities&lt;</font><font face="Courier New, Courier, mono">Person</font><font face="Courier New, Courier, mono">&gt;();</font><font face="Courier New, Courier, mono"><br>}</font><br></pre></td></tr></table><br><br>Of course, it may be more flexible to generate an array of types and do something like this:<br><br><table width="99%"><tr><td><pre class="BBcode"><br><font face="Courier New, Courier, mono">public static void GetAllData(IEnumerable&lt;Type&gt; entityTypes) {<br>&nbsp;&nbsp;&nbsp; foreach(Type type in entityTypes) {<br></font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pm.GetEntities(type);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font><font face="Courier New, Courier, mono">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br></font><font face="Courier New, Courier, mono">}</font><br></pre></td></tr></table><br><br>This better follows the open-closed principle so that you can change which types you load without modifying the method directly.<br>]]>
   </description>
   <pubDate>Mon, 03 Nov 2008 19:15:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3552#3552</guid>
  </item> 
  <item>
   <title>Save ALL Data to Local Storage? : Hi, I would like an easy way to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3550#3550</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=92" rel="nofollow">HFloyd</a><br /><strong>Subject:</strong> 981<br /><strong>Posted:</strong> 03-Nov-2008 at 2:37pm<br /><br />Hi, <br><br>I would like an easy way to save all the data for all the entities in one operation. I have looked at the "Disconnected" Tutorial and Level 100 code examples. These examples are based on a simple data graph and the data for the related entities is all pulled together using SPAN queries. <br><br>What I am interested in in basically pulling down all the entities regardless of their individual relations to one another. I would like this to be a centralized operation, not running necessarily from a single entity form. I assume this is all do-able and have looked at a possible way to accomplish it. <br><br>What I have mocked up is this:<br><br><font face="Courier New, Courier, mono">public static void GetAllData ()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityList&lt;ContactMethod&gt; mELContactMethod = new EntityList&lt;ContactMethod&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mELContactMethod = MainPm.Manager.GetEntities&lt;ContactMethod&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityList&lt;ContactMethodType&gt; mELContactMethodType = new EntityList&lt;ContactMethodType&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mELContactMethodType = MainPm.Manager.GetEntities&lt;ContactMethodType&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityList&lt;HBType&gt; mELHBType = new EntityList&lt;HBType&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mELHBType = MainPm.Manager.GetEntities&lt;HBType&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityList&lt;HouseholdBusiness&gt; mELHouseholdBusiness = new EntityList&lt;HouseholdBusiness&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mELHouseholdBusiness = MainPm.Manager.GetEntities&lt;HouseholdBusiness&gt;();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EntityList&lt;Person&gt; mELPerson = new EntityList&lt;Person&gt;();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mELPerson = MainPm.Manager.GetEntities&lt;Person&gt;();<br><br>...&lt;And so on, one for each entity in the system&gt;...<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font><br><br>Which I would call right before the "<font face="Courier New, Courier, mono">... mPersMgr.SaveEntitySet(path); ...</font>" type code.<br><br>Does this seem reasonable? Or do I need to somehow get everything into a single entity graph (like an uber-entity, which linked all the entities together using SPANs)?<br><br>Thanks for any thoughts on this.<br><br>Heather<br><br>]]>
   </description>
   <pubDate>Mon, 03 Nov 2008 14:37:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=981&amp;PID=3550#3550</guid>
  </item> 
 </channel>
</rss>