<?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 : best way for getting real ID</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : best way for getting real ID</description>
  <pubDate>Wed, 15 Apr 2026 19:59:25 -700</pubDate>
  <lastBuildDate>Wed, 04 Jun 2008 08:54:20 -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=824</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>best way for getting real ID : Erturk.  The default behavior...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=824&amp;PID=3026#3026</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 824<br /><strong>Posted:</strong> 04-Jun-2008 at 8:54am<br /><br />Erturk.<DIV>&nbsp;</DIV><DIV>The default behavior of SaveChanges is to return the updated entity to the client cache, so there is no need to query the database.&nbsp; Just access your updated entit y.&nbsp; It's primary Id will be updated.&nbsp; However, this will not work if you use the ExcludeFromPostSaveRefetch SaveOption.</DIV><DIV>&nbsp;</DIV><DIV>If you want to convert your temporary id to a real permanent id before you do the save, use the ForceIdFixup method of the PersistenceManager,</DIV>]]>
   </description>
   <pubDate>Wed, 04 Jun 2008 08:54:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=824&amp;PID=3026#3026</guid>
  </item> 
  <item>
   <title>best way for getting real ID : Hi; How can I getting the real...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=824&amp;PID=3024#3024</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=45" rel="nofollow">erturkcevik</a><br /><strong>Subject:</strong> 824<br /><strong>Posted:</strong> 04-Jun-2008 at 7:13am<br /><br />Hi;<DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'">How can I getting the real primary key value after SaveChanges. I’m using custom ID generater.</SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>Please give me some example code.</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>This following code running properly, but I'm not sure is the best way.</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p><FONT color=#0000ff></FONT></o:p></SPAN>&nbsp;</DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p><FONT color=#0000ff>private</FONT> <FONT color=#2b91af>EntityList</FONT>&lt;<FONT color=#2b91af>HT_HESAPPLANI</FONT>&gt; mHPDetay ;</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p><FONT color=#0000ff>private</FONT> <FONT color=#0000ff>int</FONT> HPID;</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p></o:p></SPAN>&nbsp;</DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>aHESAPPLANI = <FONT color=#2b91af>HT_HESAPPLANI</FONT>.Create(mPersMgr, <FONT color=#a31515>""</FONT>, <FONT color=#a31515>""</FONT>);</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>mHPDetay = <FONT color=#0000ff>new</FONT> <FONT color=#2b91af>EntityList</FONT>&lt;<FONT color=#2b91af>HT_HESAPPLANI</FONT>&gt;();</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>mHPDetay.Add(aHESAPPLANI);</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>mHPDetayBS.DataSource = mHPDetay;</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p></o:p></SPAN>&nbsp;</DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>mPersMgr.SaveChanges(mHPDetay);</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>HPID = mHPDetay&#091;0&#093;.ROWID;</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p><FONT color=#2b91af>PrimaryKey</FONT> HpPK = <FONT color=#0000ff>new</FONT> <FONT color=#2b91af>PrimaryKey</FONT>(<FONT color=#0000ff>typeof</FONT>(<FONT color=#2b91af>HT_VHESAPPLANI</FONT>), HPID);</o:p></SPAN></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p><FONT color=#2b91af>HT_VHESAPPLANI</FONT> pEntityHP = (<FONT color=#2b91af>HT_VHESAPPLANI</FONT>)mPersMgr.GetEntity(HpPK, <FONT color=#2b91af>QueryStrategy</FONT>.DataSourceOnly);</DIV><DIV><DIV></o:p></SPAN><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p></o:p></SPAN>&nbsp;</DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p></o:p></SPAN>&nbsp;</DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p>Best Regards</o:p></SPAN></DIV></DIV></DIV><DIV><SPAN lang=TR style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Arial Narrow'"><o:p></o:p></SPAN>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 04 Jun 2008 07:13:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=824&amp;PID=3024#3024</guid>
  </item> 
 </channel>
</rss>