<?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 changes in .NET 4.0</title>
	<atom:link href="http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40/feed" rel="self" type="application/rss+xml" />
	<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40</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: Damien Guard</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37484</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Fri, 05 Mar 2010 16:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37484</guid>
		<description>LINQ to SQL will never support anything other than SQL Server &amp; Compact Edition.

[)amien</description>
		<content:encoded><![CDATA[<p>LINQ to SQL will never support anything other than SQL Server &#038; Compact Edition.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: o_o</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37482</link>
		<dc:creator>o_o</dc:creator>
		<pubDate>Fri, 05 Mar 2010 16:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37482</guid>
		<description>So good to see that LINQ to SQL is not dead! We would have lost countless hours migrating to .NET 4.0 if not.
Will mysql be supported?</description>
		<content:encoded><![CDATA[<p>So good to see that LINQ to SQL is not dead! We would have lost countless hours migrating to .NET 4.0 if not.<br />
Will mysql be supported?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Beers</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37471</link>
		<dc:creator>Jerry Beers</dc:creator>
		<pubDate>Thu, 04 Mar 2010 19:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-37471</guid>
		<description>Can you talk more about the ITable interface and how to use it to improve mocking?  Or point to an article that does?

Thanks!</description>
		<content:encoded><![CDATA[<p>Can you talk more about the ITable interface and how to use it to improve mocking?  Or point to an article that does?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32679</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Fri, 18 Dec 2009 18:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32679</guid>
		<description>There are no other changes other than what is described in this list.

Adding such a feature would be of limited use as you would&#039;t be able to query on it. You could achieve by mapping the decimal as private then adding your own hand-written public MyMoney property that lazily-creates based on the private decimal and likewise updates it on set.

[)amien</description>
		<content:encoded><![CDATA[<p>There are no other changes other than what is described in this list.</p>
<p>Adding such a feature would be of limited use as you would&#8217;t be able to query on it. You could achieve by mapping the decimal as private then adding your own hand-written public MyMoney property that lazily-creates based on the private decimal and likewise updates it on set.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pita.o</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32678</link>
		<dc:creator>pita.o</dc:creator>
		<pubDate>Fri, 18 Dec 2009 17:58:55 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32678</guid>
		<description>Hi Damien:
Any chance you will have a way to attach a custom property type mapping delegate?

eg for ...

public class POCO { public Money MyMoney {get; set;} }

can we attach a delegate on-type-map that says, if source type is decimal/double and target type is Money do ... assign new Money(value)?

Otherwise does L2S have a simple globally factored way to achieve this?

That will really help.</description>
		<content:encoded><![CDATA[<p>Hi Damien:<br />
Any chance you will have a way to attach a custom property type mapping delegate?</p>
<p>eg for &#8230;</p>
<p>public class POCO { public Money MyMoney {get; set;} }</p>
<p>can we attach a delegate on-type-map that says, if source type is decimal/double and target type is Money do &#8230; assign new Money(value)?</p>
<p>Otherwise does L2S have a simple globally factored way to achieve this?</p>
<p>That will really help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luc</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32314</link>
		<dc:creator>Luc</dc:creator>
		<pubDate>Fri, 11 Dec 2009 17:49:17 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-32314</guid>
		<description>@ Damien

Hi,
The L2ST4 templates you&#039;ve developed are really nice and useful.
They work well against the dbml generated through VS. 
When running against a file generated with SQLMetal I get the following exception:

System.ArgumentNullException: Value cannot be null.
Parameter name: objectToConvert
   at Microsoft.VisualStudio.TextTemplating.ToStringHelper.ToStringWithCulture(Object objectToConvert)
   at Microsoft.VisualStudio.TextTemplatingE49A33EA5AEBE14AAF17271D723B1779.GeneratedTextTransformation.TransformText()

Can you please have a look?
Thanks,
Luc</description>
		<content:encoded><![CDATA[<p>@ Damien</p>
<p>Hi,<br />
The L2ST4 templates you&#8217;ve developed are really nice and useful.<br />
They work well against the dbml generated through VS.<br />
When running against a file generated with SQLMetal I get the following exception:</p>
<p>System.ArgumentNullException: Value cannot be null.<br />
Parameter name: objectToConvert<br />
   at Microsoft.VisualStudio.TextTemplating.ToStringHelper.ToStringWithCulture(Object objectToConvert)<br />
   at Microsoft.VisualStudio.TextTemplatingE49A33EA5AEBE14AAF17271D723B1779.GeneratedTextTransformation.TransformText()</p>
<p>Can you please have a look?<br />
Thanks,<br />
Luc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: luc</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31117</link>
		<dc:creator>luc</dc:creator>
		<pubDate>Sat, 28 Nov 2009 19:26:29 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31117</guid>
		<description>Thanks for advise Damien. 
Going live in a month so it won&#039;t cut it for us - VS 2010 launches in March, the earliest.

Can you please answer the question regarding new SQL datatypes? Are they going to be supported in L2S at par with EF?

Is the SQLServer provider used in LINQ the same with the one in EF?
Thanks again</description>
		<content:encoded><![CDATA[<p>Thanks for advise Damien.<br />
Going live in a month so it won&#8217;t cut it for us &#8211; VS 2010 launches in March, the earliest.</p>
<p>Can you please answer the question regarding new SQL datatypes? Are they going to be supported in L2S at par with EF?</p>
<p>Is the SQLServer provider used in LINQ the same with the one in EF?<br />
Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31108</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Sat, 28 Nov 2009 17:32:43 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31108</guid>
		<description>@Luc: I think you really should take a look at EF in .NET 4.0 - a great number of the issues were solved.

LINQ to SQL will never get other databases - 85% of the codebase is the SQL Server provider.

[)amien</description>
		<content:encoded><![CDATA[<p>@Luc: I think you really should take a look at EF in .NET 4.0 &#8211; a great number of the issues were solved.</p>
<p>LINQ to SQL will never get other databases &#8211; 85% of the codebase is the SQL Server provider.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: luc</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31106</link>
		<dc:creator>luc</dc:creator>
		<pubDate>Sat, 28 Nov 2009 17:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-31106</guid>
		<description>Linq2SQL is a fine and usable piece of software.
I agree 100% with Jeswin that Linq2SQL is superior to EF due to its simpler level of abstraction and the fact that ONE CAN BUILD ON TOP OF IT.

Reliable, complex systems are build with simple concepts. 
Yes, we have started with EF(due to concerns surrounding L2S) and yes we wasted two development months.

To me, as the name says, Linq2SQL gives the data layer of the application:
  - a one to one table to object mapping with translation between SQL and .Net types 
  - and a reliable way to perform CRUD operations on the database.

The problems arise when people try to use it as an object repository. This looks good only in demos.
In real life, for any complex system you need to take control of your domain objects. To avoid things like &quot;sorry, can&#039;t have the context to query from within your objects because it&#039;s not good for you&quot;.

@ 5x1llz - and other people who think EF is the answer for large systems - On the contrary, L2S could be used to build the data layer of domains as complex as you can imagine. Of course, you have to build your own domain framework, which is not hard considering L2S can do the heavy-lifting regarding the DB access.

At the other end, EF gives you a complicated, prepacked domain template that is not extensible - just try it out. EF gives you the illusion it can solve your domain but as you want to add abstractions into the framework more and more workarounds are needed to the point that a mess emerges.
From what I have experienced so far EF is:
 - too complex for simple systems
 - impossible to extend for complex systems (I am referring to extending the framework to incorporate your own abstractions and conventions).

This leaves EF for systems in the range of up to 50-100 tables, but don&#039;t get your hopes to high if you want to implement an elegant solution. Of course one can build a 200 tables system with EF (let&#039;s assume it, although I&#039;m not sure about that as I ran in significant performance problems when approaching 100 tables; even following the MS recommendation to pre-compile the model views, moved the inefficiency from the start time to compile time - not to mention that that one table with over 70 fields had to be split to reduce the views compilation from 2.5 min to 40 sec).
Just that it&#039;s not worth the pain and effort. You will spent far less time implementing your own domain as opposed to searching for workarounds that give you half baked solutions.

The reality is that complex systems are architected with specific conventions built into the domain, otherwise a 200 tables+ system becomes needlessly hard to manage. From start, EF emphasizes configurations over conventions and comes up with huge XML configuration files, very hard to maintain (csdl, msl, ssdl). If you think that the designer takes care care of it and you don&#039;t have to open/modify them - good luck with that.

IMO, EF continues the MS tradition of producing yet another data access library.
As a matter of fact, I&#039;ve read articles advising to use EF as a DAL! What?

It is said that EF v2 will be better. I&#039;m sure it will be improved considering the teamis more open to the comunity. But I am skeptical about being significantly improved as the starting point is very discouraging. 

All I know is what I tried: L2S v1 - usable; EF - v1 unusable. Kind of tired of smoke and mirrors. 

@ Damien - It seems to me that a large number of folks out there (including MS folks) hope that the L2S library lives up to its name and the really important sections will continue to be addressed: 
     - Query stability and performance - I see you guys made progress - Thank you !
     - SQL to .Net data types translation - would you not consider this a core feature and add the new SQL types? 
     - Is it possible that sometime in the future other databases will be considered?

Thanks,
Luc</description>
		<content:encoded><![CDATA[<p>Linq2SQL is a fine and usable piece of software.<br />
I agree 100% with Jeswin that Linq2SQL is superior to EF due to its simpler level of abstraction and the fact that ONE CAN BUILD ON TOP OF IT.</p>
<p>Reliable, complex systems are build with simple concepts.<br />
Yes, we have started with EF(due to concerns surrounding L2S) and yes we wasted two development months.</p>
<p>To me, as the name says, Linq2SQL gives the data layer of the application:<br />
  &#8211; a one to one table to object mapping with translation between SQL and .Net types<br />
  &#8211; and a reliable way to perform CRUD operations on the database.</p>
<p>The problems arise when people try to use it as an object repository. This looks good only in demos.<br />
In real life, for any complex system you need to take control of your domain objects. To avoid things like &#8220;sorry, can&#8217;t have the context to query from within your objects because it&#8217;s not good for you&#8221;.</p>
<p>@ 5&#215;1llz &#8211; and other people who think EF is the answer for large systems &#8211; On the contrary, L2S could be used to build the data layer of domains as complex as you can imagine. Of course, you have to build your own domain framework, which is not hard considering L2S can do the heavy-lifting regarding the DB access.</p>
<p>At the other end, EF gives you a complicated, prepacked domain template that is not extensible &#8211; just try it out. EF gives you the illusion it can solve your domain but as you want to add abstractions into the framework more and more workarounds are needed to the point that a mess emerges.<br />
From what I have experienced so far EF is:<br />
 &#8211; too complex for simple systems<br />
 &#8211; impossible to extend for complex systems (I am referring to extending the framework to incorporate your own abstractions and conventions).</p>
<p>This leaves EF for systems in the range of up to 50-100 tables, but don&#8217;t get your hopes to high if you want to implement an elegant solution. Of course one can build a 200 tables system with EF (let&#8217;s assume it, although I&#8217;m not sure about that as I ran in significant performance problems when approaching 100 tables; even following the MS recommendation to pre-compile the model views, moved the inefficiency from the start time to compile time &#8211; not to mention that that one table with over 70 fields had to be split to reduce the views compilation from 2.5 min to 40 sec).<br />
Just that it&#8217;s not worth the pain and effort. You will spent far less time implementing your own domain as opposed to searching for workarounds that give you half baked solutions.</p>
<p>The reality is that complex systems are architected with specific conventions built into the domain, otherwise a 200 tables+ system becomes needlessly hard to manage. From start, EF emphasizes configurations over conventions and comes up with huge XML configuration files, very hard to maintain (csdl, msl, ssdl). If you think that the designer takes care care of it and you don&#8217;t have to open/modify them &#8211; good luck with that.</p>
<p>IMO, EF continues the MS tradition of producing yet another data access library.<br />
As a matter of fact, I&#8217;ve read articles advising to use EF as a DAL! What?</p>
<p>It is said that EF v2 will be better. I&#8217;m sure it will be improved considering the teamis more open to the comunity. But I am skeptical about being significantly improved as the starting point is very discouraging. </p>
<p>All I know is what I tried: L2S v1 &#8211; usable; EF &#8211; v1 unusable. Kind of tired of smoke and mirrors. </p>
<p>@ Damien &#8211; It seems to me that a large number of folks out there (including MS folks) hope that the L2S library lives up to its name and the really important sections will continue to be addressed:<br />
     &#8211; Query stability and performance &#8211; I see you guys made progress &#8211; Thank you !<br />
     &#8211; SQL to .Net data types translation &#8211; would you not consider this a core feature and add the new SQL types?<br />
     &#8211; Is it possible that sometime in the future other databases will be considered?</p>
<p>Thanks,<br />
Luc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27957</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 20 Oct 2009 15:08:30 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27957</guid>
		<description>@Chad: There are no other changes except what is on this list.

You could likely achieve what you want with templated code generation, check out &lt;a href=&quot;http://l2st4.codeplex.com&quot; rel=&quot;nofollow&quot;&gt;L2ST4&lt;/a&gt;.

[)amien</description>
		<content:encoded><![CDATA[<p>@Chad: There are no other changes except what is on this list.</p>
<p>You could likely achieve what you want with templated code generation, check out <a href="http://l2st4.codeplex.com" rel="nofollow">L2ST4</a>.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad Gross</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27954</link>
		<dc:creator>Chad Gross</dc:creator>
		<pubDate>Tue, 20 Oct 2009 14:35:13 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27954</guid>
		<description>What about the ability to manage scope and visibility of mapped memebers?  We go through alot of pain in a Domain&#039;ish drvien design with this thing.  A HUGE enhancement for us would be to allow us to control the scope of the getter vs. the setter.  We always need the ability to make the setter internal and the getter public.  A major pain is to rename the generated prop to [DBColumnName]Internal and then we manually add a new prop with the name [DBColumnName] as a public getter only.</description>
		<content:encoded><![CDATA[<p>What about the ability to manage scope and visibility of mapped memebers?  We go through alot of pain in a Domain&#8217;ish drvien design with this thing.  A HUGE enhancement for us would be to allow us to control the scope of the getter vs. the setter.  We always need the ability to make the setter internal and the getter public.  A major pain is to rename the generated prop to [DBColumnName]Internal and then we manually add a new prop with the name [DBColumnName] as a public getter only.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Whidden</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27717</link>
		<dc:creator>Travis Whidden</dc:creator>
		<pubDate>Tue, 13 Oct 2009 16:03:55 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27717</guid>
		<description>I guess linq2sql isnt dead :) Whohoo!

I just hope that this is finally intergrated:
http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=963657&amp;kbln=en-us

It never made it into the 3.5 framework, and its been a known problem for a long time. The hot fix fixed the problem.  Its been available for years now.</description>
		<content:encoded><![CDATA[<p>I guess linq2sql isnt dead :) Whohoo!</p>
<p>I just hope that this is finally intergrated:<br />
<a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=963657&amp;kbln=en-us" rel="nofollow">http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=963657&amp;kbln=en-us</a></p>
<p>It never made it into the 3.5 framework, and its been a known problem for a long time. The hot fix fixed the problem.  Its been available for years now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien Guard</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27181</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Wed, 23 Sep 2009 06:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27181</guid>
		<description>Many-to-many relies on having an intermediate table in the database - LINQ to SQL supports that today but doesn&#039;t hide that fact and doing so would be counter to the table=class concept LINQ to SQL uses.

It is possible to hide intermediate tables yourself - PLINQO does it through templates and could probably modify the L2ST4 templates to achieve a similar result.

With response to the other questions about SqlCache, full-text indexes, spacial support etc. - if it&#039;s not on this list then you can assume it&#039;s won&#039;t be part of .NET 4.0. 

[)amien</description>
		<content:encoded><![CDATA[<p>Many-to-many relies on having an intermediate table in the database &#8211; LINQ to SQL supports that today but doesn&#8217;t hide that fact and doing so would be counter to the table=class concept LINQ to SQL uses.</p>
<p>It is possible to hide intermediate tables yourself &#8211; PLINQO does it through templates and could probably modify the L2ST4 templates to achieve a similar result.</p>
<p>With response to the other questions about SqlCache, full-text indexes, spacial support etc. &#8211; if it&#8217;s not on this list then you can assume it&#8217;s won&#8217;t be part of .NET 4.0. </p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Svahn</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27179</link>
		<dc:creator>Peter Svahn</dc:creator>
		<pubDate>Wed, 23 Sep 2009 06:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27179</guid>
		<description>Are there any plans to support many-to-many asscoiations in Linq to SQL?</description>
		<content:encoded><![CDATA[<p>Are there any plans to support many-to-many asscoiations in Linq to SQL?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeswin</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27146</link>
		<dc:creator>Jeswin</dc:creator>
		<pubDate>Tue, 22 Sep 2009 12:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-27146</guid>
		<description>Good to hear that Linq to Sql is actively improved. We recently moved a project from EF to L2S (yes!) due to performance issues. 

In some ways it is actually superior to EF due to its simplicity; if you give people simple tools they will figure out how to solve complex problems in ways you haven&#039;t imagined. (We are building inheritance support on top of Linq2Sql by modifying expression trees).</description>
		<content:encoded><![CDATA[<p>Good to hear that Linq to Sql is actively improved. We recently moved a project from EF to L2S (yes!) due to performance issues. </p>
<p>In some ways it is actually superior to EF due to its simplicity; if you give people simple tools they will figure out how to solve complex problems in ways you haven&#8217;t imagined. (We are building inheritance support on top of Linq2Sql by modifying expression trees).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
