<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SQL command when inserting M:N association with identity columns in the underlying table</title>
	<atom:link href="http://blog.cincura.net/231230-sql-command-when-inserting-mn-association-with-identity-columns-in-the-underlying-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cincura.net/231230-sql-command-when-inserting-mn-association-with-identity-columns-in-the-underlying-table/</link>
	<description>Taking something that can&#039;t be done, and then doing it.</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:25:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: cincura.net</title>
		<link>http://blog.cincura.net/231230-sql-command-when-inserting-mn-association-with-identity-columns-in-the-underlying-table/#comment-2462</link>
		<dc:creator>cincura.net</dc:creator>
		<pubDate>Fri, 19 Feb 2010 08:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cincura.net/?p=231230#comment-2462</guid>
		<description>I know what&#039;s there. But for a first sight without semicolons it was &quot;interesting&quot;. :)</description>
		<content:encoded><![CDATA[<p>I know what&#8217;s there. But for a first sight without semicolons it was &#8220;interesting&#8221;. <img src='http://blog.cincura.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Stuntz</title>
		<link>http://blog.cincura.net/231230-sql-command-when-inserting-mn-association-with-identity-columns-in-the-underlying-table/#comment-2460</link>
		<dc:creator>Craig Stuntz</dc:creator>
		<pubDate>Thu, 18 Feb 2010 14:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cincura.net/?p=231230#comment-2460</guid>
		<description>There are three statements here.

The first, which is line 1 only, declares a table-valued variable. Table valued variables are sort of like temp tables, but they are scoped only for the current batch.

The second, which is lines 2 through 4, does the INSERT.

The third, lines 5-7, returns the identity values.

The basic problem is that you cannot use SCOPE_IDENTITY() to retrieve the identity values, since there is more than one. But the EF needs to know the values for both columns, so that it can set the entity keys correctly.</description>
		<content:encoded><![CDATA[<p>There are three statements here.</p>
<p>The first, which is line 1 only, declares a table-valued variable. Table valued variables are sort of like temp tables, but they are scoped only for the current batch.</p>
<p>The second, which is lines 2 through 4, does the INSERT.</p>
<p>The third, lines 5-7, returns the identity values.</p>
<p>The basic problem is that you cannot use SCOPE_IDENTITY() to retrieve the identity values, since there is more than one. But the EF needs to know the values for both columns, so that it can set the entity keys correctly.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
