<?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: Linq to SQL Quirks Part 4: Circular References</title>
	<atom:link href="http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/</link>
	<description>Problems that I come across in day to day coding</description>
	<lastBuildDate>Tue, 30 Aug 2011 06:31:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Slavik</title>
		<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/comment-page-1/#comment-15482</link>
		<dc:creator>Slavik</dc:creator>
		<pubDate>Wed, 02 Feb 2011 14:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=239#comment-15482</guid>
		<description>My version:
db.ResourceVersions.InsertOnSubmit(newResourceVersion);
db.SubmitChanges();

newResource.LastVersion = newResourceVersion;
db.SubmitChanges();

ts.Complete();</description>
		<content:encoded><![CDATA[<p>My version:<br />
db.ResourceVersions.InsertOnSubmit(newResourceVersion);<br />
db.SubmitChanges();</p>
<p>newResource.LastVersion = newResourceVersion;<br />
db.SubmitChanges();</p>
<p>ts.Complete();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wizzard</title>
		<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/comment-page-1/#comment-5359</link>
		<dc:creator>wizzard</dc:creator>
		<pubDate>Mon, 16 Nov 2009 09:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=239#comment-5359</guid>
		<description>Ideally, yes, and if you can work out a way to do it in a single transaction, that would be better.  However, I was really just focusing on the problem and a workaround.  It isn&#039;t a perfect workaround, but the risk of failure between the 2 transactions is fairly small, and in the case of the system that I was working on, the consequences are not so severe.</description>
		<content:encoded><![CDATA[<p>Ideally, yes, and if you can work out a way to do it in a single transaction, that would be better.  However, I was really just focusing on the problem and a workaround.  It isn&#8217;t a perfect workaround, but the risk of failure between the 2 transactions is fairly small, and in the case of the system that I was working on, the consequences are not so severe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adriano</title>
		<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/comment-page-1/#comment-5356</link>
		<dc:creator>Adriano</dc:creator>
		<pubDate>Fri, 13 Nov 2009 16:54:23 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=239#comment-5356</guid>
		<description>Hi,

You solved this problem by breaking the circular reference in two operations. But don&#039;t you need a transaction for these two operations? I mean, to treat these operation as one operation only?

Thanks,

Adriano</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>You solved this problem by breaking the circular reference in two operations. But don&#8217;t you need a transaction for these two operations? I mean, to treat these operation as one operation only?</p>
<p>Thanks,</p>
<p>Adriano</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wizzard</title>
		<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/comment-page-1/#comment-4240</link>
		<dc:creator>wizzard</dc:creator>
		<pubDate>Fri, 14 Aug 2009 08:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=239#comment-4240</guid>
		<description>No – the reason it is a problem with inserts is that Linq to SQL doesn’t know which way around to insert the records because they both have IDs referencing each other and neither ID exists yet because they haven’t been inserted. With updates, the records already have IDs, so it just keeps those</description>
		<content:encoded><![CDATA[<p>No – the reason it is a problem with inserts is that Linq to SQL doesn’t know which way around to insert the records because they both have IDs referencing each other and neither ID exists yet because they haven’t been inserted. With updates, the records already have IDs, so it just keeps those</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wes</title>
		<link>http://rainstorms.me.uk/blog/2009/07/10/linq-to-sql-quirks-part-4-circular-references/comment-page-1/#comment-4233</link>
		<dc:creator>Wes</dc:creator>
		<pubDate>Thu, 13 Aug 2009 21:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=239#comment-4233</guid>
		<description>Thank you, that solved the issue for me today with inserting.

Does the same issue ever come up with updates?</description>
		<content:encoded><![CDATA[<p>Thank you, that solved the issue for me today with inserting.</p>
<p>Does the same issue ever come up with updates?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

