<?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?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linq-to-sql-changes-in-net-40</link>
	<description>A .NET developer in silicon valley</description>
	<lastBuildDate>Fri, 18 May 2012 15:31:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Arman</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-42135</link>
		<dc:creator>Arman</dc:creator>
		<pubDate>Fri, 23 Jul 2010 04:45:33 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-42135</guid>
		<description>I&#039;m currently working with Entity Framework and there are things that we need to do but can&#039;t without an ugly hack or directly querying Stored Procedures. If Microsoft is trying to enforce &quot;good practice&quot; it&#039;s not working. So we ended up having a mix of ADO .Net, Entity Framework and now I&#039;m looking into LINQ to SQL (I love it!). Finally MS had something that made writing data centric apps as easy as in FoxPro. But wait... FoxPro is closing to its end also.</description>
		<content:encoded><![CDATA[<p>I&#8217;m currently working with Entity Framework and there are things that we need to do but can&#8217;t without an ugly hack or directly querying Stored Procedures. If Microsoft is trying to enforce &#8220;good practice&#8221; it&#8217;s not working. So we ended up having a mix of ADO .Net, Entity Framework and now I&#8217;m looking into LINQ to SQL (I love it!). Finally MS had something that made writing data centric apps as easy as in FoxPro. But wait&#8230; FoxPro is closing to its end also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41963</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Fri, 11 Jun 2010 22:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41963</guid>
		<description>If you are going POCO, is it possible for ICollection or IList to resolve to an EntitySet when querying data so then we get some kind of lazy loading support.

I think everyone thinks EF should be great, but it&#039;s too much work for alot of applications. Okay, LINQtoSQL is never going to be LINQtoMySQL or LINQtoOracle... But adding dynamic LINQ into the library as standard, making many-to-many references easier... Okay technically someone might feel that it isn&#039;t LINQ or LINQtoSQL... But the point is that those features would help developers be productive and in my opinion niether of those features contaminate what you&#039;re trying to do. If anything it makes SQL Server more attractive to businesses because when you write applications you don&#039;t need the complexity of EF, but you&#039;re getting most of the benefit.

If it&#039;ll help, with due consideration give the people what they want!

I remember when C# was just released and alot of people asked about optional parameters. I remember seeing someone say, it&#039;ll never happen and I was kind of glad at the time. I had the same fear about &#039;dynamic&#039; keyword too, thats for another time. Now we&#039;ve got optional parameters, I don&#039;t have to write loads of overloads, I quite like it.

I shouldn&#039;t of been so closed minded.

I guess it re-inforces that C# and .NET is there to do a job, it&#039;s not a religion.</description>
		<content:encoded><![CDATA[<p>If you are going POCO, is it possible for ICollection or IList to resolve to an EntitySet when querying data so then we get some kind of lazy loading support.</p>
<p>I think everyone thinks EF should be great, but it&#8217;s too much work for alot of applications. Okay, LINQtoSQL is never going to be LINQtoMySQL or LINQtoOracle&#8230; But adding dynamic LINQ into the library as standard, making many-to-many references easier&#8230; Okay technically someone might feel that it isn&#8217;t LINQ or LINQtoSQL&#8230; But the point is that those features would help developers be productive and in my opinion niether of those features contaminate what you&#8217;re trying to do. If anything it makes SQL Server more attractive to businesses because when you write applications you don&#8217;t need the complexity of EF, but you&#8217;re getting most of the benefit.</p>
<p>If it&#8217;ll help, with due consideration give the people what they want!</p>
<p>I remember when C# was just released and alot of people asked about optional parameters. I remember seeing someone say, it&#8217;ll never happen and I was kind of glad at the time. I had the same fear about &#8216;dynamic&#8217; keyword too, thats for another time. Now we&#8217;ve got optional parameters, I don&#8217;t have to write loads of overloads, I quite like it.</p>
<p>I shouldn&#8217;t of been so closed minded.</p>
<p>I guess it re-inforces that C# and .NET is there to do a job, it&#8217;s not a religion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Calvin</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41452</link>
		<dc:creator>Calvin</dc:creator>
		<pubDate>Fri, 30 Apr 2010 12:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41452</guid>
		<description>Reading the comments above, It seems that a lot of people are confused about what L2S actually is... not sure why though... I think the name fully describes what it is. Linq to [MS]Sql. If you want other databases you would need to write linq providers for them, which could aptly be named, LinqToOracle, LinqToMySql, LinqToWhateverDataSourceYouWant... 

Why people &lt;b&gt;expect&lt;/b&gt; MS to write products for competing vendors is beyond me.

As for the comments surrounding EF, I agree with the general consensus that EF is about as good for data access, as a piece of feces is good for dinner! It is painfully slow, and the while the idea of abstracting your models for use with different databases is great, EF manages to bugger that up by relying on the clients having the models of the underlying databases! Imagine having 10 clients all using database X, and then trying to migrate to database Y. Instead of the abstraction happening in one place, it is happening on all 10 clients!! ALL of which now need to be updated!!! Obviously that only leaves EF useful as DAL, which in fact turns out to be horrible idea as the compilation is so horribly slow. 

Having said that however, I do agree with the approach of not automatically lazy loading data. This can lead to some rather interesting bugs, especially if the context gets disposed between queries. 

In certain scenarios where the lazy loading behavior is desirable, it can be easily achieved by extending your entity objects... ie. Remove original foreign key reference property, add your own property with a query in the get accessor to the other side of the partial class. Not exactly rocket science. I do realize it would be easier if the code was auto generated, but especially when it comes to auto generated code it is never a good idea to generate code that can cause confusing bugs for developers.</description>
		<content:encoded><![CDATA[<p>Reading the comments above, It seems that a lot of people are confused about what L2S actually is&#8230; not sure why though&#8230; I think the name fully describes what it is. Linq to [MS]Sql. If you want other databases you would need to write linq providers for them, which could aptly be named, LinqToOracle, LinqToMySql, LinqToWhateverDataSourceYouWant&#8230; </p>
<p>Why people <b>expect</b> MS to write products for competing vendors is beyond me.</p>
<p>As for the comments surrounding EF, I agree with the general consensus that EF is about as good for data access, as a piece of feces is good for dinner! It is painfully slow, and the while the idea of abstracting your models for use with different databases is great, EF manages to bugger that up by relying on the clients having the models of the underlying databases! Imagine having 10 clients all using database X, and then trying to migrate to database Y. Instead of the abstraction happening in one place, it is happening on all 10 clients!! ALL of which now need to be updated!!! Obviously that only leaves EF useful as DAL, which in fact turns out to be horrible idea as the compilation is so horribly slow. </p>
<p>Having said that however, I do agree with the approach of not automatically lazy loading data. This can lead to some rather interesting bugs, especially if the context gets disposed between queries. </p>
<p>In certain scenarios where the lazy loading behavior is desirable, it can be easily achieved by extending your entity objects&#8230; ie. Remove original foreign key reference property, add your own property with a query in the get accessor to the other side of the partial class. Not exactly rocket science. I do realize it would be easier if the code was auto generated, but especially when it comes to auto generated code it is never a good idea to generate code that can cause confusing bugs for developers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41071</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 26 Apr 2010 13:21:48 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-41071</guid>
		<description>Damian, I like many people have found this blog post very useful. There are a large number of us that love Linq-to-sql and were very happy to see these improvements being added to .NET 4.0 .

Many thanks for keeping us updated. You mention in your last post that you are not on the LINQ dev team anymore however your blog is the one that comes up when you do any searches for LINQ-to-SQL. Can you share with us any other blogs or places where we can find anymore information about LINQ-to-SQL, i.e. current developer blogs.

Hopefully Microsoft have realised that there is widespread support for LINQ-to-SQL and will continue to develop it alongside Entity Framework.</description>
		<content:encoded><![CDATA[<p>Damian, I like many people have found this blog post very useful. There are a large number of us that love Linq-to-sql and were very happy to see these improvements being added to .NET 4.0 .</p>
<p>Many thanks for keeping us updated. You mention in your last post that you are not on the LINQ dev team anymore however your blog is the one that comes up when you do any searches for LINQ-to-SQL. Can you share with us any other blogs or places where we can find anymore information about LINQ-to-SQL, i.e. current developer blogs.</p>
<p>Hopefully Microsoft have realised that there is widespread support for LINQ-to-SQL and will continue to develop it alongside Entity Framework.</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-40150</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Thu, 15 Apr 2010 16:42:42 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-40150</guid>
		<description>Dynamic LINQ isn&#039;t part of LINQ to SQL and it wouldn&#039;t be if it ever were to be added as it is used to build LINQ trees for any type of IQueryable provider.

It&#039;s also quite specialized and advanced. I&#039;d rather see the framework stay smaller and focused and have dynamic LINQ move into CodePlex - but I&#039;m not on LINQ/.NET Framework any more so don&#039;t have any insider knowledge.

[)amien</description>
		<content:encoded><![CDATA[<p>Dynamic LINQ isn&#8217;t part of LINQ to SQL and it wouldn&#8217;t be if it ever were to be added as it is used to build LINQ trees for any type of IQueryable provider.</p>
<p>It&#8217;s also quite specialized and advanced. I&#8217;d rather see the framework stay smaller and focused and have dynamic LINQ move into CodePlex &#8211; but I&#8217;m not on LINQ/.NET Framework any more so don&#8217;t have any insider knowledge.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-40050</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Wed, 14 Apr 2010 20:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-40050</guid>
		<description>No native support for dynamic linq was added (as ScottGu explains here: http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx)

I was under the impression that the reason this feature wasn&#039;t in the first version was simply because you ran out of time. I guess I assumed that meant it would be in the next version!

Extremely useful for ad hoc where clauses (the only time I ever really use it.)</description>
		<content:encoded><![CDATA[<p>No native support for dynamic linq was added (as ScottGu explains here: <a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" rel="nofollow">http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx</a>)</p>
<p>I was under the impression that the reason this feature wasn&#8217;t in the first version was simply because you ran out of time. I guess I assumed that meant it would be in the next version!</p>
<p>Extremely useful for ad hoc where clauses (the only time I ever really use it.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fschwiet</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39965</link>
		<dc:creator>fschwiet</dc:creator>
		<pubDate>Tue, 13 Apr 2010 21:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39965</guid>
		<description>&quot;LINQ to SQL will never get other databases – 85% of the codebase is the SQL Server provider.&quot;

I was looking at EF for this exact reason, though I like linq2sql alot myself.  I needed to interface with a MySQL database.  What I found is that EF&#039;s MySQL support is pretty limited.  It sounds like the problem is more related to the MySQL Connector software used to allow MySQL support (which is not Microsoft software).  I&#039;m just saying EF isn&#039;t necessarily going to solve people&#039;s cross database compatibility issues either.

If only Linq to nHibernate were more complete, I&#039;d be using nHibernate.  I only experimented with fluent nHibernate some, but its was pretty sweet for setting up object/table mappings.

My experience using linq2sql has been great.  The main reason I can&#039;t use it in production environments is that the systems I work on use stored procs that return multiple tables, which is not supported natively by either linq2sql or EF.</description>
		<content:encoded><![CDATA[<p>&#8220;LINQ to SQL will never get other databases – 85% of the codebase is the SQL Server provider.&#8221;</p>
<p>I was looking at EF for this exact reason, though I like linq2sql alot myself.  I needed to interface with a MySQL database.  What I found is that EF&#8217;s MySQL support is pretty limited.  It sounds like the problem is more related to the MySQL Connector software used to allow MySQL support (which is not Microsoft software).  I&#8217;m just saying EF isn&#8217;t necessarily going to solve people&#8217;s cross database compatibility issues either.</p>
<p>If only Linq to nHibernate were more complete, I&#8217;d be using nHibernate.  I only experimented with fluent nHibernate some, but its was pretty sweet for setting up object/table mappings.</p>
<p>My experience using linq2sql has been great.  The main reason I can&#8217;t use it in production environments is that the systems I work on use stored procs that return multiple tables, which is not supported natively by either linq2sql or EF.</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-39935</link>
		<dc:creator>Damien Guard</dc:creator>
		<pubDate>Tue, 13 Apr 2010 15:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39935</guid>
		<description>You can modify the TSQL if you have a specific point where you know you are going to execute the query - see my &lt;a href=&quot;http://damieng.com/blog/2009/04/12/linq-to-sql-tips-and-tricks-2&quot; rel=&quot;nofollow&quot;&gt;LINQ to SQL tips and tricks #2&lt;/a&gt; post.

[)amien</description>
		<content:encoded><![CDATA[<p>You can modify the TSQL if you have a specific point where you know you are going to execute the query &#8211; see my <a href="http://damieng.com/blog/2009/04/12/linq-to-sql-tips-and-tricks-2" rel="nofollow">LINQ to SQL tips and tricks #2</a> post.</p>
<p>[)amien</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrew</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39933</link>
		<dc:creator>andrew</dc:creator>
		<pubDate>Tue, 13 Apr 2010 15:40:41 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39933</guid>
		<description>Any idea if it is now possible to &quot;fiddle with&quot; the sql, like adding OPTION (RECOMPILE) at the end of the SQL used in sp_executesql() ?</description>
		<content:encoded><![CDATA[<p>Any idea if it is now possible to &#8220;fiddle with&#8221; the sql, like adding OPTION (RECOMPILE) at the end of the SQL used in sp_executesql() ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Visual Studio 2010 and .NET 4 Released - ScottGu's Blog</title>
		<link>http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39883</link>
		<dc:creator>Visual Studio 2010 and .NET 4 Released - ScottGu's Blog</dc:creator>
		<pubDate>Tue, 13 Apr 2010 06:45:09 +0000</pubDate>
		<guid isPermaLink="false">http://damieng.com/blog/2009/06/01/linq-to-sql-changes-in-net-40#comment-39883</guid>
		<description>[...] In addition to improvements with the Entity Framework, LINQ to SQL with .NET 4 also includes a bunch of nice improvements.&#160; [...]</description>
		<content:encoded><![CDATA[<p>[...] In addition to improvements with the Entity Framework, LINQ to SQL with .NET 4 also includes a bunch of nice improvements.&#160; [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

