<?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 2: DeleteOnSubmit and Entity not Attached</title>
	<atom:link href="http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/feed/" rel="self" type="application/rss+xml" />
	<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/</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: Hadi Sharifi</title>
		<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/comment-page-1/#comment-25847</link>
		<dc:creator>Hadi Sharifi</dc:creator>
		<pubDate>Fri, 24 Jun 2011 12:14:34 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=165#comment-25847</guid>
		<description>Many many thanks, You are very great developer, You really helped me, All the Best</description>
		<content:encoded><![CDATA[<p>Many many thanks, You are very great developer, You really helped me, All the Best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Lowther</title>
		<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/comment-page-1/#comment-13640</link>
		<dc:creator>Dave Lowther</dc:creator>
		<pubDate>Wed, 05 Jan 2011 19:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=165#comment-13640</guid>
		<description>Thanks, this saved me some (more) misery.</description>
		<content:encoded><![CDATA[<p>Thanks, this saved me some (more) misery.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron</title>
		<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/comment-page-1/#comment-7354</link>
		<dc:creator>Ron</dc:creator>
		<pubDate>Thu, 10 Jun 2010 12:09:45 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=165#comment-7354</guid>
		<description>Great post, really helped me out!

Is this a better way of checking? I&#039;m guessing if the ID field is automatically generated by the DB then checking for a 0 is more efficient but I&#039;m not sure if it&#039;s too safe.</description>
		<content:encoded><![CDATA[<p>Great post, really helped me out!</p>
<p>Is this a better way of checking? I&#8217;m guessing if the ID field is automatically generated by the DB then checking for a 0 is more efficient but I&#8217;m not sure if it&#8217;s too safe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Siamak</title>
		<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/comment-page-1/#comment-5275</link>
		<dc:creator>Siamak</dc:creator>
		<pubDate>Fri, 23 Oct 2009 07:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=165#comment-5275</guid>
		<description>Very well explained, thank you very much for posting this. It helped me to solve my problem.

I just have a suggestion/alternative way about step 2, for checking if entity already exists. 
If you don&#039;t have identity field to check for ID, then in general always could do:

Instead of: &#039;If ID=0&#039; 

Could do: &#039;if (DataContext.Table.GetOriginalEntityState(item) == null)&#039;</description>
		<content:encoded><![CDATA[<p>Very well explained, thank you very much for posting this. It helped me to solve my problem.</p>
<p>I just have a suggestion/alternative way about step 2, for checking if entity already exists.<br />
If you don&#8217;t have identity field to check for ID, then in general always could do:</p>
<p>Instead of: &#8216;If ID=0&#8242; </p>
<p>Could do: &#8216;if (DataContext.Table.GetOriginalEntityState(item) == null)&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Linq to SQL Quirks Part 3 &#8211; Extension to Get Around the Delete Problem &#124; Wizz's Coding Solutions</title>
		<link>http://rainstorms.me.uk/blog/2009/06/23/linq-to-sql-quirks-part-2-deleteonsubmit-and-entity-not-attached/comment-page-1/#comment-3176</link>
		<dc:creator>Linq to SQL Quirks Part 3 &#8211; Extension to Get Around the Delete Problem &#124; Wizz's Coding Solutions</dc:creator>
		<pubDate>Tue, 30 Jun 2009 21:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://rainstorms.me.uk/blog/?p=165#comment-3176</guid>
		<description>[...] previous post about problems deleting can be partly handled with an extension method to the Linq to SQL Table(Of [...]</description>
		<content:encoded><![CDATA[<p>[...] previous post about problems deleting can be partly handled with an extension method to the Linq to SQL Table(Of [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

