<?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 for Graeme Hill on .NET development</title>
	<atom:link href="http://graemehill.ca/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://graemehill.ca</link>
	<description></description>
	<pubDate>Wed, 10 Mar 2010 09:17:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Discard changes in LINQ to SQL DataContext by Derin</title>
		<link>http://graemehill.ca/discard-changes-in-linq-to-sql-datacontext/comment-page-1#comment-635</link>
		<dc:creator>Derin</dc:creator>
		<pubDate>Thu, 25 Feb 2010 12:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=5#comment-635</guid>
		<description>Thanks Graemehill,

I searched a lot find a solution to discard all changes, now i got.

it was really helpful

thanks</description>
		<content:encoded><![CDATA[<p>Thanks Graemehill,</p>
<p>I searched a lot find a solution to discard all changes, now i got.</p>
<p>it was really helpful</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WPF rendering thread synchronization by Wallace Kelly</title>
		<link>http://graemehill.ca/wpf-rendering-thread-synchronization/comment-page-1#comment-630</link>
		<dc:creator>Wallace Kelly</dc:creator>
		<pubDate>Thu, 11 Feb 2010 06:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=79#comment-630</guid>
		<description>See the ongoing conversation on this topic here: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/</description>
		<content:encoded><![CDATA[<p>See the ongoing conversation on this topic here: <a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/');" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/693fbedb-efa6-413e-ab66-530c6961d3fb/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Discard changes in LINQ to SQL DataContext by macias</title>
		<link>http://graemehill.ca/discard-changes-in-linq-to-sql-datacontext/comment-page-1#comment-629</link>
		<dc:creator>macias</dc:creator>
		<pubDate>Wed, 10 Feb 2010 12:47:48 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=5#comment-629</guid>
		<description>Unfortunately I found problem with discard along with transactions. Please take a look:

begin trans
insert
update (of inserted record)
*
commit trans

in case of failure, all changes should be discarded.

However since all actions are inside transaction, on failure the insert is rolled back, and there is no way to fetch the data back to record to discard update. As the result of DiscardChanges I get exception from Linq about non existing record.

I can make a workaround for this particular case, but it would be great if someone had an idea for general, smart solution.</description>
		<content:encoded><![CDATA[<p>Unfortunately I found problem with discard along with transactions. Please take a look:</p>
<p>begin trans<br />
insert<br />
update (of inserted record)<br />
*<br />
commit trans</p>
<p>in case of failure, all changes should be discarded.</p>
<p>However since all actions are inside transaction, on failure the insert is rolled back, and there is no way to fetch the data back to record to discard update. As the result of DiscardChanges I get exception from Linq about non existing record.</p>
<p>I can make a workaround for this particular case, but it would be great if someone had an idea for general, smart solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on LINQ to SQL Gotcha #4: ChangeConflictException on Update of Manually Attached Data by Saving changes to stored procedure results in LINQ to SQL &#124; Graeme Hill on .NET development</title>
		<link>http://graemehill.ca/linq-to-sql-gotcha-4-changeconflictexception-on-update-of-manually-attached-data/comment-page-1#comment-628</link>
		<dc:creator>Saving changes to stored procedure results in LINQ to SQL &#124; Graeme Hill on .NET development</dc:creator>
		<pubDate>Wed, 10 Feb 2010 05:23:18 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=232#comment-628</guid>
		<description>[...] Contact      &#171; LINQ to SQL Gotcha #4: ChangeConflictException on Update of Manually Attached Data [...]</description>
		<content:encoded><![CDATA[<p>[...] Contact      &laquo; LINQ to SQL Gotcha #4: ChangeConflictException on Update of Manually Attached Data [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Discard changes in LINQ to SQL DataContext by macias</title>
		<link>http://graemehill.ca/discard-changes-in-linq-to-sql-datacontext/comment-page-1#comment-624</link>
		<dc:creator>macias</dc:creator>
		<pubDate>Fri, 29 Jan 2010 11:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=5#comment-624</guid>
		<description>Thank you very much for explanation. I have still problems with inserts though. Normally I work like this:
record = new Record();
db.Table.InsertOnSubmit(record);

// here setting all the values of the record

// here discard may occur (+jump off the procedure)

and despite the loop iterates through this table it does not discard changes.

As a workaround I introduced new bool value which tracks if this is new record or just edit, and just before submit I add

// here discard may occur (+jump off the procedure)
if (is_insert)
  db.Table.InsertOnSubmit(record);

This works, but thanks to not using discarding inserts.</description>
		<content:encoded><![CDATA[<p>Thank you very much for explanation. I have still problems with inserts though. Normally I work like this:<br />
record = new Record();<br />
db.Table.InsertOnSubmit(record);</p>
<p>// here setting all the values of the record</p>
<p>// here discard may occur (+jump off the procedure)</p>
<p>and despite the loop iterates through this table it does not discard changes.</p>
<p>As a workaround I introduced new bool value which tracks if this is new record or just edit, and just before submit I add</p>
<p>// here discard may occur (+jump off the procedure)<br />
if (is_insert)<br />
  db.Table.InsertOnSubmit(record);</p>
<p>This works, but thanks to not using discarding inserts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Discard changes in LINQ to SQL DataContext by Graeme</title>
		<link>http://graemehill.ca/discard-changes-in-linq-to-sql-datacontext/comment-page-1#comment-623</link>
		<dc:creator>Graeme</dc:creator>
		<pubDate>Tue, 26 Jan 2010 17:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=5#comment-623</guid>
		<description>Refresh() just reverts the properties on an entity to their original state based on values in the database.  Basically, it is an operation on the entities that you pass in the parameter, not on the DataContext.  The result is that it will update entity properties, but not necessarily that entity's state in the DataContext.

If encapsulation is what you're worried about, just make a functions that calls DiscardInsertsAndDeletes and DiscardUpdates.</description>
		<content:encoded><![CDATA[<p>Refresh() just reverts the properties on an entity to their original state based on values in the database.  Basically, it is an operation on the entities that you pass in the parameter, not on the DataContext.  The result is that it will update entity properties, but not necessarily that entity&#8217;s state in the DataContext.</p>
<p>If encapsulation is what you&#8217;re worried about, just make a functions that calls DiscardInsertsAndDeletes and DiscardUpdates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WPF rendering thread synchronization by Hunter</title>
		<link>http://graemehill.ca/wpf-rendering-thread-synchronization/comment-page-1#comment-622</link>
		<dc:creator>Hunter</dc:creator>
		<pubDate>Tue, 26 Jan 2010 10:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=79#comment-622</guid>
		<description>great!
Thanks!</description>
		<content:encoded><![CDATA[<p>great!<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Discard changes in LINQ to SQL DataContext by macias</title>
		<link>http://graemehill.ca/discard-changes-in-linq-to-sql-datacontext/comment-page-1#comment-621</link>
		<dc:creator>macias</dc:creator>
		<pubDate>Tue, 26 Jan 2010 10:06:36 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=5#comment-621</guid>
		<description>Thank you for useful post -- one question though. Why the same method with refresh does not work for inserts? I.e. I would like to make the discarding procedure uniform for all three types, so I thought the best pick would be to refresh all tables -- altered by delete, insert or update.</description>
		<content:encoded><![CDATA[<p>Thank you for useful post &#8212; one question though. Why the same method with refresh does not work for inserts? I.e. I would like to make the discarding procedure uniform for all three types, so I thought the best pick would be to refresh all tables &#8212; altered by delete, insert or update.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unit testing an Entity Framework DAL part 2: Rolling back the test database by High performance database rollback in automated tests with SQL Server &#124; Graeme Hill on .NET development</title>
		<link>http://graemehill.ca/unit-testing-an-entity-framework-data-access-layer-part-2-rolling-back-the-test-database/comment-page-1#comment-620</link>
		<dc:creator>High performance database rollback in automated tests with SQL Server &#124; Graeme Hill on .NET development</dc:creator>
		<pubDate>Sat, 23 Jan 2010 17:29:02 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=134#comment-620</guid>
		<description>[...] why I think it is reasonable for unit tests to hit a real database. Subsequently, I wrote a follow up article describing some techniques for rolling back your database to its original state after each test. In [...]</description>
		<content:encoded><![CDATA[<p>[...] why I think it is reasonable for unit tests to hit a real database. Subsequently, I wrote a follow up article describing some techniques for rolling back your database to its original state after each test. In [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on High performance database rollback in automated tests with SQL Server by Unit testing an Entity Framework DAL part 2: Rolling back the test database &#124; Graeme Hill on .NET development</title>
		<link>http://graemehill.ca/high-performance-database-rollback-in-automated-tests-with-sql-server/comment-page-1#comment-619</link>
		<dc:creator>Unit testing an Entity Framework DAL part 2: Rolling back the test database &#124; Graeme Hill on .NET development</dc:creator>
		<pubDate>Sat, 23 Jan 2010 17:27:20 +0000</pubDate>
		<guid isPermaLink="false">http://graemehill.ca/?p=179#comment-619</guid>
		<description>[...] (Jan 23, 2010): I have made a new post explaining a method that I think is better than any of those described [...]</description>
		<content:encoded><![CDATA[<p>[...] (Jan 23, 2010): I have made a new post explaining a method that I think is better than any of those described [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
