<?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 details, issues and patterns</title>
	<atom:link href="http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns/feed" rel="self" type="application/rss+xml" />
	<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns</link>
	<description>A .NET developer in Redmond</description>
	<lastBuildDate>Sun, 14 Mar 2010 14:22:22 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kro</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-9135</link>
		<dc:creator>Kro</dc:creator>
		<pubDate>Tue, 12 Aug 2008 16:13:35 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-9135</guid>
		<description>&quot;Is many to may relationship possible in LINQ?&quot;

You have to use an intermediary table.</description>
		<content:encoded><![CDATA[<p>&#8220;Is many to may relationship possible in LINQ?&#8221;</p>
<p>You have to use an intermediary table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: XXX</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-8871</link>
		<dc:creator>XXX</dc:creator>
		<pubDate>Fri, 20 Jun 2008 07:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-8871</guid>
		<description>Is many to may relationship possible in LINQ?</description>
		<content:encoded><![CDATA[<p>Is many to may relationship possible in LINQ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Rusk</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-4528</link>
		<dc:creator>John Rusk</dc:creator>
		<pubDate>Mon, 08 Oct 2007 08:19:47 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-4528</guid>
		<description>Hi Damien,

You mentioned queries returning objects that do not match the query.  It&#039;s a shame that MS haven&#039;t taken advantage of LINQ to solve this (or at least, partially solve it).  They should be able to run the criteria again in memory (after the SQL) to strip out the non-matching objects.  I tried to describe this here http://dotnet.agilekiwi.com/blog/index.html (under the heading &quot;option 4&quot;), but unfortunately the post got a little too wordy! :-)</description>
		<content:encoded><![CDATA[<p>Hi Damien,</p>
<p>You mentioned queries returning objects that do not match the query.  It&#8217;s a shame that MS haven&#8217;t taken advantage of LINQ to solve this (or at least, partially solve it).  They should be able to run the criteria again in memory (after the SQL) to strip out the non-matching objects.  I tried to describe this here <a href="http://dotnet.agilekiwi.com/blog/index.html" rel="nofollow">http://dotnet.agilekiwi.com/blog/index.html</a> (under the heading &#8220;option 4&#8243;), but unfortunately the post got a little too wordy! :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-1850</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Fri, 18 May 2007 20:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-1850</guid>
		<description>There are certainly some considerations to be made with the DataContext especially relating to how entities are cached and changes not saved back until the commit is processed.&lt;br /&gt;&lt;br /&gt;I&#039;m afraid I don&#039;t have any more specific information right now - I hope Microsoft&#039;s PAG will produce a best-practices document on using LINQ to SQL in web environments.&lt;br /&gt;&lt;br /&gt;[)amien</description>
		<content:encoded><![CDATA[<p>There are certainly some considerations to be made with the DataContext especially relating to how entities are cached and changes not saved back until the commit is processed.</p>
<p>I&#8217;m afraid I don&#8217;t have any more specific information right now &#8211; I hope Microsoft&#8217;s PAG will produce a best-practices document on using LINQ to SQL in web environments.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erdsah88@gmail.com</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-1849</link>
		<dc:creator>erdsah88@gmail.com</dc:creator>
		<pubDate>Thu, 17 May 2007 22:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-1849</guid>
		<description>? use type datasets right now as a dataaccess layer representing my business entities and DlinQ seems really sexy with the partial class approach.&lt;br /&gt;&lt;br /&gt;But the thing is what about the deployment problems it can cause?everything is getting coupled with the datacontext object, will that bring more problem than the solution in a transactionless(transaction free) web enviroment?</description>
		<content:encoded><![CDATA[<p>? use type datasets right now as a dataaccess layer representing my business entities and DlinQ seems really sexy with the partial class approach.</p>
<p>But the thing is what about the deployment problems it can cause?everything is getting coupled with the datacontext object, will that bring more problem than the solution in a transactionless(transaction free) web enviroment?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Warren</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-1848</link>
		<dc:creator>Matt Warren</dc:creator>
		<pubDate>Thu, 17 May 2007 08:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-1848</guid>
		<description>LINQ to SQL does actual use version numbers. Each entity can either use a version number or some or all of its fields to do the optimistic concurrency check. If a version number exists in the database, LINQ to SQL will use only that field.  Otherwise you can specify in the mapping which fields are used.  The designer and SQLMetal both &#039;guess&#039; at these for you.  They will choose to not use CLOB and BLOB fields for optimistic concurrency.</description>
		<content:encoded><![CDATA[<p>LINQ to SQL does actual use version numbers. Each entity can either use a version number or some or all of its fields to do the optimistic concurrency check. If a version number exists in the database, LINQ to SQL will use only that field.  Otherwise you can specify in the mapping which fields are used.  The designer and SQLMetal both &#8216;guess&#8217; at these for you.  They will choose to not use CLOB and BLOB fields for optimistic concurrency.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-1847</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Thu, 17 May 2007 03:50:52 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-1847</guid>
		<description>Sorry about the CRs, I have to write my comments in a separate text editor because the live comment preview slows to a crawl beyond a few lines :/</description>
		<content:encoded><![CDATA[<p>Sorry about the CRs, I have to write my comments in a separate text editor because the live comment preview slows to a crawl beyond a few lines :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://damieng.com/blog/2007/05/16/linq-to-sql-details-issues-and-patterns#comment-1846</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Thu, 17 May 2007 03:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/archive/2007/05/16/linq-to-sql-details-issues-and-patterns.aspx#comment-1846</guid>
		<description>&quot;By default LINQ to SQL creates UPDATE statements that include every field as it was when read in the WHERE clause and not just the primary key as you might expect. The upshot is that if the record has changed since it was loaded it will not find it.&quot;&lt;br /&gt;&lt;br /&gt;An interesting approach to optimistic locking - most people use version number fields or some derivative. There&#039;s a problem with their approach to this - CLOB and BLOB columns and partitioning. You can&#039;t use this technique on tables with large object columns, and any vertical partitioning will make this approach very inefficient. The latter is perhaps less common but BLOBs certainly aren&#039;t.&lt;br /&gt;&lt;br /&gt;Maybe they just ignore BLOB columns and expect you to put an always-updated field in there (like a timestamp or version number) - although that kind of defeats the object since you might as well just use that one field in that case.&lt;br /&gt;&lt;br /&gt;One thing that often irritates me about MS frameworks is that they a) reinvent&lt;br /&gt;the wheel, b) always seem to be in beta, unfinished, or about to be replaced&lt;br /&gt;with a new interface-breaking version. If you want to make something stable you&lt;br /&gt;want something that&#039;s been around in the real world for a while and had the&lt;br /&gt;kinks ironed out already. LINQ looks nice in theory but I&#039;m willing to bet it&lt;br /&gt;will have plenty of problems in the short term. I suspect their inability to stick to one framework / interface is to do with their background as a product company that constantly needs to push out something new and buzzwordy for people to buy. J2EE might have become less sexy these days, but at least it has solutions for things like this which have been used and proven over many years, without being end-of-lined all the time to make way for the next sexy acronym. Stablility isn&#039;t sexy, but I know which I prefer when it comes to writing production code.&lt;br /&gt;</description>
		<content:encoded><![CDATA[<p>&#8220;By default LINQ to SQL creates UPDATE statements that include every field as it was when read in the WHERE clause and not just the primary key as you might expect. The upshot is that if the record has changed since it was loaded it will not find it.&#8221;</p>
<p>An interesting approach to optimistic locking &#8211; most people use version number fields or some derivative. There&#8217;s a problem with their approach to this &#8211; CLOB and BLOB columns and partitioning. You can&#8217;t use this technique on tables with large object columns, and any vertical partitioning will make this approach very inefficient. The latter is perhaps less common but BLOBs certainly aren&#8217;t.</p>
<p>Maybe they just ignore BLOB columns and expect you to put an always-updated field in there (like a timestamp or version number) &#8211; although that kind of defeats the object since you might as well just use that one field in that case.</p>
<p>One thing that often irritates me about MS frameworks is that they a) reinvent<br />the wheel, b) always seem to be in beta, unfinished, or about to be replaced<br />with a new interface-breaking version. If you want to make something stable you<br />want something that&#8217;s been around in the real world for a while and had the<br />kinks ironed out already. LINQ looks nice in theory but I&#8217;m willing to bet it<br />will have plenty of problems in the short term. I suspect their inability to stick to one framework / interface is to do with their background as a product company that constantly needs to push out something new and buzzwordy for people to buy. J2EE might have become less sexy these days, but at least it has solutions for things like this which have been used and proven over many years, without being end-of-lined all the time to make way for the next sexy acronym. Stablility isn&#8217;t sexy, but I know which I prefer when it comes to writing production code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
