<?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 : Saving Order</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Saving Order</description>
  <pubDate>Wed, 13 May 2026 08:55:01 -700</pubDate>
  <lastBuildDate>Wed, 22 Feb 2012 09:55:47 -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=3261</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>Saving Order :   Hi Von,try an IEnumerable...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12733#12733</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> 3261<br /><strong>Posted:</strong> 22-Feb-2012 at 9:55am<br /><br />Hi Von,<div>&nbsp;</div><div>try an IEnumerable of entities:</div><div>&nbsp;</div><div>mgr.SaveChanges(new Entity&#091;&#093; {entity});</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 09:55:47 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12733#12733</guid>
  </item> 
  <item>
   <title>Saving Order : Hi Silvio,I&amp;#039;m trying to do...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12727#12727</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3261<br /><strong>Posted:</strong> 21-Feb-2012 at 11:31pm<br /><br />Hi Silvio,<div><br></div><div>I'm trying to do your work around but it seems that there's no overload for SaveChanges() that accepts a single entity but rather an IEnumerable of entities.</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Tue, 21 Feb 2012 23:31:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12727#12727</guid>
  </item> 
  <item>
   <title>Saving Order :   Von,Unfortunatelly, this is...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12663#12663</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> 3261<br /><strong>Posted:</strong> 14-Feb-2012 at 11:56am<br /><br />Von,<div>&nbsp;</div><div>Unfortunatelly, this is how EF handles the saves and there isn't really any other way to handle this issue.</div><div>&nbsp;</div><div>You could create some sort of automated partial SaveChanges:</div><div>&nbsp;</div><div>foreach (var entity in listOfEntitiesToBeSaved) {</div><div>&nbsp;&nbsp; mgr.SaveChanges(entity):</div><div>}</div><div>&nbsp;</div><div>bear in mind that listOfEntitiesToBeSaved must be properly ordered and you will need to properly handle any other entities related to the ones being saved that might not be in that list.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Tue, 14 Feb 2012 11:56:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12663#12663</guid>
  </item> 
  <item>
   <title>Saving Order : Hi,Hmmm.. I think that&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12658#12658</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3261<br /><strong>Posted:</strong> 13-Feb-2012 at 4:59pm<br /><br />Hi,<div><br></div><div>Hmmm.. I think that's not convenient in our part because if i have 1000 items, I'll save them one by one?</div><div>What we want to accomplish is simple, to save it in order we create it and not in reverse order.</div><div>Can you give us a workaround for this?</div><div><br></div><div>Thanks,</div><div>Von</div>]]>
   </description>
   <pubDate>Mon, 13 Feb 2012 16:59:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12658#12658</guid>
  </item> 
  <item>
   <title>Saving Order :   Hi Von,Unfortunatelly there...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12655#12655</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> 3261<br /><strong>Posted:</strong> 13-Feb-2012 at 8:43am<br /><br />Hi Von,<div>&nbsp;</div><div>Unfortunatelly there is no way to control the order of the entities being saved within one SaveChanges/SaveChangesAsync call.</div><div>&nbsp;</div><div>What I'd suggest is to call SaveChanges for each of the entities in the desired order.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Mon, 13 Feb 2012 08:43:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12655#12655</guid>
  </item> 
  <item>
   <title>Saving Order : Hi,How do I order entities to...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12650#12650</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1228" rel="nofollow">Vonzkie</a><br /><strong>Subject:</strong> 3261<br /><strong>Posted:</strong> 13-Feb-2012 at 1:38am<br /><br />Hi,<div><br></div><div>How do I order entities to w/c should be saved first to the database?</div><div>Example I have a table named tblOrders that has a primary key of Order ID.</div><div><br></div><div>When I add 3 orders it will looks like this:</div><div><br></div><div>&nbsp;Order ID &nbsp;<span ="Apple-tab-span" style="white-space:pre">	</span>Column A &nbsp;<span ="Apple-tab-span" style="white-space:pre">		</span>Column B</div><div>- 100 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span ="Apple-tab-span" style="white-space:pre">	</span>Hello<span ="Apple-tab-span" style="white-space:pre">	</span>&nbsp; &nbsp;<span ="Apple-tab-span" style="white-space:pre">			</span>Hello Again</div><div>- 101 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span ="Apple-tab-span" style="white-space:pre">	</span>Hi<span ="Apple-tab-span" style="white-space:pre">		</span>&nbsp; &nbsp; <span ="Apple-tab-span" style="white-space:pre">		</span>Hi Again</div><div>- 102 &nbsp; &nbsp; &nbsp; &nbsp; <span ="Apple-tab-span" style="white-space:pre">	</span>H<span ="Apple-tab-span" style="white-space:pre">		</span>&nbsp; &nbsp; <span ="Apple-tab-span" style="white-space:pre">		</span>H Again</div><div><br></div><div>When I call the save method of the entity manager, what will happen is that the orders will be saved in reverse order.</div><div>Why is that so? and how do we save it in the order we want? In this case, we want it to be saved in the order we see it right now..</div><div><br></div><div>Thanks,</div><div>Von&nbsp;</div><div><br></div><div><br></div>]]>
   </description>
   <pubDate>Mon, 13 Feb 2012 01:38:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3261&amp;PID=12650#12650</guid>
  </item> 
 </channel>
</rss>