<?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 : Insert / Update</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Insert / Update</description>
  <pubDate>Sun, 12 Apr 2026 23:35:28 -700</pubDate>
  <lastBuildDate>Wed, 24 Aug 2011 10:13:33 -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=2921</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>Insert / Update : Hi Aaron;This sounds like a similar...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2921&amp;PID=11513#11513</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2921<br /><strong>Posted:</strong> 24-Aug-2011 at 10:13am<br /><br />Hi Aaron;<div><br></div><div>This sounds like a similar question you had sent to our support system. I've replied to this question yesterday at 7:26 pm so I'm assuming you did not get it. Here's my reply again.<br><div><br></div><div><table width="99%"><tr><td class="BBquote"></div><div>Hi Aaron;<br><br>Ok, I'm still not entirely clear on your questions so I'm just going to give my assumptions and possible answers here.<br><br>Assumption 1: You have a database view made up from some tables exposed to your ViewModel and DevForce is used to retrieve, insert and update data from that view. You're asking whether you should check the existence of a row first in the table to decide whether to do an insert or update. <br><br>Answer 1: No you don't need to check or do an AttachEntity. If you make your database view updatable (as shown here, <a href="http://blogs.msdn.com/b/alexj/archive/2009/09/01/tip-34-how-to-work-with-updatable-views.aspx" target="_blank">http://blogs.msdn.com/b/alexj/archive/2009/09/01/tip-34-how-to-work-with-updatable-views.aspx</a>.) any insert/update you make to the database view is automatically handled by EntityFramework and applied to its corresponding table(s).<br><br>Assumption 2: You have the view-backed entity and then other entity types representing tables in that view and it is in fact updatable.<br><br>Answer 2: EntityFramework, not DevForce, will determine how to insert/update the underlying tables when you make changes to instances of this entity type. You don’t need to do an attach or anything else. You can query these entities into cache and then make modifications as usual.<br><br>Conclusion: Regardless of whether you already have an updatable view or not, we delegate all of this to EntityFramework so whatever EntityFramework supports, we do too.<br><br>Hope this helps.<br><br>Regards,<br>Denis<br></div></div><div></td></tr></table></div>]]>
   </description>
   <pubDate>Wed, 24 Aug 2011 10:13:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2921&amp;PID=11513#11513</guid>
  </item> 
  <item>
   <title>Insert / Update :     do I need to check for...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2921&amp;PID=11510#11510</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1166" rel="nofollow">daw451</a><br /><strong>Subject:</strong> 2921<br /><strong>Posted:</strong> 24-Aug-2011 at 6:19am<br /><br /><font size="3" face="Times New Roman"></font><p style="margin: 0in 0in 0pt;" ="Ms&#111;normal"><span style='color: rgb31, 73, 125; font-family: "Calibri","sans-serif"; font-size: 11pt;'>do I need to check for the existence of a row to decide whetherto do an update or an insert? Is there a way to attach the entities and do anasync save and let ideablade determine whether to update it or insert it.</p><div></div></span><font size="3" face="Times New Roman"><div></div>Thanks</font>]]>
   </description>
   <pubDate>Wed, 24 Aug 2011 06:19:26 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2921&amp;PID=11510#11510</guid>
  </item> 
 </channel>
</rss>