<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: T4 Toolbox: LINQ to SQL classes generator</title>
	<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/</link>
	<description>Interfaces are like alcohol - they are a lot of fun when used in moderation.</description>
	<pubDate>Sat, 04 Feb 2012 05:32:43 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Paul</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3369</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Wed, 02 Mar 2011 12:04:01 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3369</guid>
		<description>I tried the NorthwindSolution but when I exceute the Northwind.tt-file I get an error:
LinqToSqlDataContextTemplate.tt	line 1 Column 1, here the File:
The LinqToSqlDataContextTemplate.tt is:
/// mappingSource as a parameter, this generator simply calls the matching base
/// constructor.
/// 
/// 
Hwat I deed wrong?</description>
		<content:encoded><![CDATA[<p>I tried the NorthwindSolution but when I exceute the Northwind.tt-file I get an error:<br />
LinqToSqlDataContextTemplate.tt	line 1 Column 1, here the File:<br />
The LinqToSqlDataContextTemplate.tt is:<br />
/// mappingSource as a parameter, this generator simply calls the matching base<br />
/// constructor.<br />
///<br />
///<br />
Hwat I deed wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Overbay</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3140</link>
		<dc:creator>Tim Overbay</dc:creator>
		<pubDate>Fri, 04 Jun 2010 20:02:18 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3140</guid>
		<description>Apparently, MS programmers don't use StyleCop, either. The field names for the property backers of the new "auto-implemented properties" in VS 2010 use underscores.</description>
		<content:encoded><![CDATA[<p>Apparently, MS programmers don&#8217;t use StyleCop, either. The field names for the property backers of the new &#8220;auto-implemented properties&#8221; in VS 2010 use underscores.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim Overbay</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3139</link>
		<dc:creator>Tim Overbay</dc:creator>
		<pubDate>Fri, 04 Jun 2010 19:59:27 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3139</guid>
		<description>This seems like a very interesting tool, but the lack of code generation for sprocs and removing the underscores from the property backers concerns me.

Why all the rigmarole with changing the property backers to camelCase without the leading underscore?

Being a long-time VB programmer, I like the property name with an underscore as the name of the private field. While this isn't really a show-stopper with VB anymore, it's still much more readable and avoids problems like the one Vadim described above.

You mentioned the reason behind this change is to comply with StyleCop. Why is this even a rule in StyleCop? I don't use StyleCop, but it seems like a ridiculous rule tailored for C# code.</description>
		<content:encoded><![CDATA[<p>This seems like a very interesting tool, but the lack of code generation for sprocs and removing the underscores from the property backers concerns me.</p>
<p>Why all the rigmarole with changing the property backers to camelCase without the leading underscore?</p>
<p>Being a long-time VB programmer, I like the property name with an underscore as the name of the private field. While this isn&#8217;t really a show-stopper with VB anymore, it&#8217;s still much more readable and avoids problems like the one Vadim described above.</p>
<p>You mentioned the reason behind this change is to comply with StyleCop. Why is this even a rule in StyleCop? I don&#8217;t use StyleCop, but it seems like a ridiculous rule tailored for C# code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tae-Sung Shin</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3012</link>
		<dc:creator>Tae-Sung Shin</dc:creator>
		<pubDate>Sat, 24 Apr 2010 22:06:23 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-3012</guid>
		<description>Oleg

I had the same error messages as Rasheed when I ran your demo. After some digging, I found following single line solved the problem. 



I am sure you bloged about this but the line is missing in your sample code.

Anyway, great blog! Learned a lot.</description>
		<content:encoded><![CDATA[<p>Oleg</p>
<p>I had the same error messages as Rasheed when I ran your demo. After some digging, I found following single line solved the problem. </p>
<p>I am sure you bloged about this but the line is missing in your sample code.</p>
<p>Anyway, great blog! Learned a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2903</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Thu, 18 Feb 2010 17:41:52 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2903</guid>
		<description>Jacobus,

In the LINQ to SQL designer, you can specify different names for the class and for the table it is mapped to. This can be done using the Properties window.

Oleg</description>
		<content:encoded><![CDATA[<p>Jacobus,</p>
<p>In the LINQ to SQL designer, you can specify different names for the class and for the table it is mapped to. This can be done using the Properties window.</p>
<p>Oleg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacobus</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2893</link>
		<dc:creator>Jacobus</dc:creator>
		<pubDate>Thu, 04 Feb 2010 23:52:46 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2893</guid>
		<description>How can I change the code generation to change the names of generated classes? Like getting rid of prefixes etc.
Thanks</description>
		<content:encoded><![CDATA[<p>How can I change the code generation to change the names of generated classes? Like getting rid of prefixes etc.<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2396</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Tue, 27 Oct 2009 22:47:27 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2396</guid>
		<description>Erik, could you be more specific?</description>
		<content:encoded><![CDATA[<p>Erik, could you be more specific?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2395</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 27 Oct 2009 20:49:47 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2395</guid>
		<description>Did Rasheed ever find a solution to his problem?  I'm getting the same issue.</description>
		<content:encoded><![CDATA[<p>Did Rasheed ever find a solution to his problem?  I&#8217;m getting the same issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oleg Sych</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2313</link>
		<dc:creator>Oleg Sych</dc:creator>
		<pubDate>Tue, 06 Oct 2009 21:29:00 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2313</guid>
		<description>Wouter,

It would be great if LINQ to SQL designer could support additional attributes. Unfortunately, I don't think it does. It may be possible to hack the DBML in XML editor, but at that point, you would be better off writing this logic by hand in partial classes.

Oleg</description>
		<content:encoded><![CDATA[<p>Wouter,</p>
<p>It would be great if LINQ to SQL designer could support additional attributes. Unfortunately, I don&#8217;t think it does. It may be possible to hack the DBML in XML editor, but at that point, you would be better off writing this logic by hand in partial classes.</p>
<p>Oleg</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wouter</title>
		<link>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2312</link>
		<dc:creator>Wouter</dc:creator>
		<pubDate>Tue, 06 Oct 2009 13:33:57 +0000</pubDate>
		<guid>http://www.olegsych.com/2009/01/t4-toolbox-linq-to-sql-classes-generator/#comment-2312</guid>
		<description>Thanks Oleg for this thorough explanation. So by changing the tt file(s) I can change what code is generated based on the dbml.
But I am wondering: is it also possible to extend the dbml file itself, so that I can add extra properties to the columns present in the tables? (By properties I mean those in the "Properties Window" of Visual Studio.) I would like to use these extra properties in the code generation.
As a simple example: Wuold it be possible to add a "DefaultValue" property that I can set on each column and use this to add a DefaultValueAttribute to each generated property (in addition to the currently added ColumnAttribute)?</description>
		<content:encoded><![CDATA[<p>Thanks Oleg for this thorough explanation. So by changing the tt file(s) I can change what code is generated based on the dbml.<br />
But I am wondering: is it also possible to extend the dbml file itself, so that I can add extra properties to the columns present in the tables? (By properties I mean those in the &#8220;Properties Window&#8221; of Visual Studio.) I would like to use these extra properties in the code generation.<br />
As a simple example: Wuold it be possible to add a &#8220;DefaultValue&#8221; property that I can set on each column and use this to add a DefaultValueAttribute to each generated property (in addition to the currently added ColumnAttribute)?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

