<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://dotnet.org.za/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hilton Giesenow&amp;#39;s Jumbled Mind</title><link>http://dotnet.org.za/hiltong/default.aspx</link><description>the madness that is...</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Shoe Circus vs. New Family</title><link>http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx</link><pubDate>Fri, 19 Sep 2008 10:48:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:628869</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Well I watched &lt;a href="http://www.microsoft.com/video/en/us/details/d6ed1c4d-10e0-4774-885a-e19c5fba2e73" target="_blank"&gt;Shoe Circus&lt;/a&gt; earlier this week, and I must admit I didn&amp;#39;t get it all, despite being a Seinfeld fan. I watched &lt;a href="http://www.microsoft.com/video/en/us/details/df102345-4270-41be-8a0d-c6b284aeced7" target="_blank"&gt;New Family&lt;/a&gt; this morning though and it was excellent! If you&amp;#39;re a fan of either Bill Gates or Jerry Seinfeld, check them out.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;;subject=Shoe+Circus+vs.+New+Family" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;;title=Shoe+Circus+vs.+New+Family" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;title=Shoe+Circus+vs.+New+Family" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;;title=Shoe+Circus+vs.+New+Family" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx&amp;amp;;title=Shoe+Circus+vs.+New+Family&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/19/shoe-circus-vs-new-family.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=628869" width="1" height="1"&gt;</description></item><item><title>Winforms JS Minifyer</title><link>http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx</link><pubDate>Thu, 18 Sep 2008 12:41:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:624991</guid><dc:creator>hiltong</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt; For Tech Ed recently I did a talk on ASP.NET performance and scalability, and one of the topics we discussed was &lt;a href="http://en.wikipedia.org/wiki/Minify" target="_blank"&gt;minifying&lt;/a&gt; JavaScript, which basically means getting rid of all of the comments, whitespace, etc. There are a couple of tools out there that do this, probably the most popular of which is Douglas Crockford&amp;#39;s &lt;a href="http://www.crockford.com/javascript/jsmin.html" target="_blank"&gt;JSMin&lt;/a&gt;. The only problem is that it&amp;#39;s a console app (which is great for automated builds, but not as good for demo&amp;#39;ing on stage). So, I wrote a small winforms wrapper around JSMin, which you can download here: &lt;a href="http://cid-27db9e33d5aafcf2.skydrive.live.com/self.aspx/Downloads/Visual%20JS%20Minifier.zip" target="_blank"&gt;Visual JavaScript Minifier&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;In case you&amp;#39;re still now sure what it is, here&amp;#39;s a screenshot:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/WinformsJSMinifyer_CEA7/Screenshot_2.png"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/WinformsJSMinifyer_CEA7/Screenshot_thumb.png" style="border:0px none;" alt="Screenshot" width="757" border="0" height="601" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;;subject=Winforms+JS+Minifyer" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;;title=Winforms+JS+Minifyer" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;title=Winforms+JS+Minifyer" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;;title=Winforms+JS+Minifyer" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx&amp;amp;;title=Winforms+JS+Minifyer&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/09/18/winforms-js-minifyer.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=624991" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/ASP.Net/default.aspx">ASP.Net</category></item><item><title>Visual Studio eXtensibility (VSX) Video - How Do I: Create a Basic Language Service Using the Managed Babel System?</title><link>http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx</link><pubDate>Mon, 18 Aug 2008 10:07:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:531499</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;My latest &lt;a href="http://msdn.microsoft.com/en-gb/vstudio/bb507746.aspx"&gt;VSX How Do I Video&lt;/a&gt; is on how to build a language service using the Managed Babel infrastructure. A Language Service is the infrastructure that allows Visual Studio to provide editing for your language, like Intellisense, syntax colouring, etc. (See &lt;a href="http://msdn.microsoft.com/en-us/library/bb166391.aspx"&gt;Language Service Essentials&lt;/a&gt; for more) Managed Babel is a set of starting points to help build your own language service (see &lt;a href="http://msdn.microsoft.com/en-us/library/bb165670%28VS.80%29.aspx"&gt;Babel Package Overview&lt;/a&gt; for more).&lt;/p&gt; &lt;p&gt;The full video can be found at &lt;a href="http://msdn.microsoft.com/en-us/vstudio/cc837016.aspx" target="_blank"&gt;How Do I: Create a Basic Language Service Using the Managed Babel System?&lt;/a&gt;. Here&amp;#39;s a screenshot for a simple C-style language:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIC_AA79/Screenshot_2.jpg"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIC_AA79/Screenshot_thumb.jpg" style="border:0px none;" alt="Screenshot" width="1028" border="0" height="772" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;;subject=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Create+a+Basic+Language+Service+Using+the+Managed+Babel+System%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Create+a+Basic+Language+Service+Using+the+Managed+Babel+System%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Create+a+Basic+Language+Service+Using+the+Managed+Babel+System%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Create+a+Basic+Language+Service+Using+the+Managed+Babel+System%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Create+a+Basic+Language+Service+Using+the+Managed+Babel+System%3f&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/18/visual-studio-extensibility-vsx-video-how-do-i-create-a-basic-language-service-using-the-managed-babel-system.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=531499" width="1" height="1"&gt;</description></item><item><title>Logging LINQ To SQL Queries</title><link>http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx</link><pubDate>Fri, 08 Aug 2008 08:03:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:516245</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I posted recently on &lt;a href="http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx" target="_blank"&gt;logging the LINQ To SQL output to the ASP.NET response stream&lt;/a&gt;. Damien Guard has an even better post on logging &lt;a href="http://damieng.com/blog/2008/07/30/linq-to-sql-log-to-debug-window-file-memory-or-multiple-writers" target="_blank"&gt;to all kinds of places, including multiple writers&lt;/a&gt;.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;;subject=Logging+LINQ+To+SQL+Queries" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;;title=Logging+LINQ+To+SQL+Queries" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;title=Logging+LINQ+To+SQL+Queries" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;;title=Logging+LINQ+To+SQL+Queries" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx&amp;amp;;title=Logging+LINQ+To+SQL+Queries&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/08/logging-linq-to-sql-queries.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=516245" width="1" height="1"&gt;</description></item><item><title>Validation Method Timing in LINQ To SQL</title><link>http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx</link><pubDate>Thu, 07 Aug 2008 20:47:52 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:515579</guid><dc:creator>hiltong</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=515579</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx#comments</comments><description>&lt;p&gt;The LINQ To SQL designer-generated classes contain 3 different ways to implement validation based on property values. Two of these are internal, in the form of partial methods, and one is external in the form events on the domain classes themselves. However, the timing around these differs slightly, so I&amp;#39;m going to examine them according to the timing.&lt;/p&gt; &lt;p&gt;To look into these approaches, I&amp;#39;m using the Customers table from Northwind. I&amp;#39;ve got it on my LINQ To SQL designer, and I&amp;#39;ve implemented the following additional&amp;nbsp; partial class:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;
&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Collections.Generic;
&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Linq;
&lt;span style="color:blue;"&gt;using &lt;/span&gt;System.Text;

&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;ConsoleApplication1
{
    &lt;span style="color:blue;"&gt;public partial class &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Customer
    &lt;/span&gt;{

        &lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnCityChanging(&lt;span style="color:blue;"&gt;string &lt;/span&gt;value)
        {
            &lt;span style="color:blue;"&gt;if &lt;/span&gt;(value == &lt;span style="color:#a31515;"&gt;&amp;quot;Cape Town&amp;quot;&lt;/span&gt;)
                &lt;span style="color:blue;"&gt;throw new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Not in my town!&amp;quot;&lt;/span&gt;);
        }

        &lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnCityChanged()
        {
            &lt;span style="color:blue;"&gt;if &lt;/span&gt;(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.City == &lt;span style="color:#a31515;"&gt;&amp;quot;Johannesburg&amp;quot;&lt;/span&gt;)
                &lt;span style="color:blue;"&gt;throw new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;What are you doing up there?!&amp;quot;&lt;/span&gt;);
        }

    }
}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;In this class, you can see that I&amp;#39;m validating the &amp;quot;city&amp;quot; property both before and after it is set. What is important is that this validation code will fire directly during the property setter on the domain class. For instance, an exception will be thrown for both of the following two cases:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:#2b91af;"&gt;Customer &lt;/span&gt;c = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Customer&lt;/span&gt;();
c.City = &lt;span style="color:#a31515;"&gt;&amp;quot;Cape Town&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;and&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:#2b91af;"&gt;Customer &lt;/span&gt;c = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Customer&lt;/span&gt;();
c.City = &lt;span style="color:#a31515;"&gt;&amp;quot;Johannesburg&amp;quot;&lt;/span&gt;;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;and in fact the validation is roughly equivalent in terms of timing because both of these methods are called during the property setter, as the following code snippet from the designer-generated code show:&lt;/p&gt;&lt;pre class="code"&gt;[&lt;span style="color:#2b91af;"&gt;Column&lt;/span&gt;(Storage=&lt;span style="color:#a31515;"&gt;&amp;quot;_City&amp;quot;&lt;/span&gt;, DbType=&lt;span style="color:#a31515;"&gt;&amp;quot;NVarChar(15)&amp;quot;&lt;/span&gt;)]
&lt;span style="color:blue;"&gt;public string &lt;/span&gt;City
{
    &lt;span style="color:blue;"&gt;get
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;return this&lt;/span&gt;._City;
    }
    &lt;span style="color:blue;"&gt;set
    &lt;/span&gt;{
        &lt;span style="color:blue;"&gt;if &lt;/span&gt;((&lt;span style="color:blue;"&gt;this&lt;/span&gt;._City != &lt;span style="color:blue;"&gt;value&lt;/span&gt;))
        {
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;.OnCityChanging(&lt;span style="color:blue;"&gt;value&lt;/span&gt;);
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;.SendPropertyChanging();
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;._City = &lt;span style="color:blue;"&gt;value&lt;/span&gt;;
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;.SendPropertyChanged(&lt;span style="color:#a31515;"&gt;&amp;quot;City&amp;quot;&lt;/span&gt;);
            &lt;span style="color:blue;"&gt;this&lt;/span&gt;.OnCityChanged();
        }
    }
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;Of course, this also implies that validation outside of the Customer class structure (i.e. using the PropertyChanging or PropertyChanged events, fired via the SendPropertyChanging and SendPropertyChanged methods, respectively) will occur at the same. As a point of common sense, I would recommend doing the validation in the &amp;quot;changing&amp;quot; methods because then the value has not yet in fact been set and the change can be effectively &amp;quot;rolled back&amp;quot;.&lt;/p&gt;
&lt;p&gt;In contrast to the above approach, it is possible to subsume all of your validation logic into one place and implementing the OnValidate partial method, as follows:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnValidate(System.Data.Linq.&lt;span style="color:#2b91af;"&gt;ChangeAction &lt;/span&gt;action)
{
    &lt;span style="color:blue;"&gt;if &lt;/span&gt;(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.ContactName == &lt;span style="color:#a31515;"&gt;&amp;quot;Hilton Giesenow&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;throw new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;He&amp;#39;s too young for Northwind!!&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;But this method has two important points of interest. First off, it allows you to potentially control the type of change that is occurring in the database (via the ChangeAction enumeration, which has values of None, Insert, Update and Delete). In addition, the timing is quite different on this method - it only fires as part of the final SubmitChanges method call on the datacontext - i.e. when the database call is about to be made. If you are creating a new instance, for instance for an Insert, and setting the properties just before the call to SubmitChanges, the difference in timing between these two approaches is basically academic. However, if you are creating a new Customer and setting properties as part of a series of UI operations for instance, and only planning to make the SubmitChanges database call at a later stage, this difference is of some importance.&lt;/p&gt;
&lt;p&gt;I would suggest that the safest approach is to combine the two by moving the actual validation logic out into a separate method (to keep it DRY, of course) and calling it from both places, like so:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnValidate(System.Data.Linq.&lt;span style="color:#2b91af;"&gt;ChangeAction &lt;/span&gt;action)
{
    ValidateCity(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.City);
}

&lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnCityChanging(&lt;span style="color:blue;"&gt;string &lt;/span&gt;value)
{
    ValidateCity(value); 
}

&lt;span style="color:blue;"&gt;partial void &lt;/span&gt;OnCityChanged()
{
    ValidateCity(&lt;span style="color:blue;"&gt;this&lt;/span&gt;.City);
}

&lt;span style="color:blue;"&gt;protected void &lt;/span&gt;ValidateCity(&lt;span style="color:blue;"&gt;string &lt;/span&gt;value)
{
    &lt;span style="color:blue;"&gt;if &lt;/span&gt;(value == &lt;span style="color:#a31515;"&gt;&amp;quot;Cape Town&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;throw new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;Not in my town!&amp;quot;&lt;/span&gt;);
    &lt;span style="color:blue;"&gt;else if &lt;/span&gt;(value == &lt;span style="color:#a31515;"&gt;&amp;quot;Johannesburg&amp;quot;&lt;/span&gt;)
        &lt;span style="color:blue;"&gt;throw new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;Exception&lt;/span&gt;(&lt;span style="color:#a31515;"&gt;&amp;quot;What are you doing up there?!&amp;quot;&lt;/span&gt;);
}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;(I know I&amp;#39;ve removed the ContactName validation and replaced it with the ValidateCity call in the OnValidate - I was trying to illustrate the consolidated approach).&lt;/p&gt;
&lt;p&gt;This approach doesn&amp;#39;t cover the external clients, but this sort of validation should be internal to the class anyway.&lt;/p&gt;
&lt;p&gt;For an different angle on this stuff&amp;nbsp; with some great additional areas of coverage, check out &lt;a href="http://blogs.msdn.com/bethmassi/archive/2008/02/25/simple-validation-with-linq-to-sql-classes.aspx" target="_blank"&gt;Simple Validation with LINQ to SQL Classes&lt;/a&gt; by Beth Massi.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;;subject=Validation+Method+Timing+in+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;;title=Validation+Method+Timing+in+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;title=Validation+Method+Timing+in+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;;title=Validation+Method+Timing+in+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx&amp;amp;;title=Validation+Method+Timing+in+LINQ+To+SQL&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/07/validation-method-timing-in-linq-to-sql.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=515579" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Linq/default.aspx">Linq</category></item><item><title>Generating Enums From Database Tables</title><link>http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx</link><pubDate>Wed, 06 Aug 2008 15:57:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:513463</guid><dc:creator>hiltong</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=513463</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx#comments</comments><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I posted earlier about &lt;a href="http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx" target="_blank"&gt;how to use enums in LINQ To SQL&lt;/a&gt;, and I spoke about why I think &lt;a href="http://msdn.microsoft.com/en-us/library/sbbt4032.aspx" target="_blank"&gt;enums&lt;/a&gt; are useful. The only problem with this approach was that you had to create the enums by hand, even if you had the same data sitting in a lookup table. If you were at my recent Code Generation with T4 Chalk &amp;#39;n Talk at Tech Ed South Africa, you would have seen me generate enums automatically from the database, which is what we&amp;#39;re going to do below. &lt;/p&gt;&lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;If you&amp;#39;re not familiar at all with T4, check out this post on &lt;a href="http://dotnet.org.za/hiltong/archive/2008/02/18/t4-template-items.aspx" target="_blank"&gt;T4 Templates&lt;/a&gt;.&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;template &lt;/span&gt;&lt;span style="color:red;"&gt;language=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;c#&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;output &lt;/span&gt;&lt;span style="color:red;"&gt;extension=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;.cs&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;assembly &lt;/span&gt;&lt;span style="color:red;"&gt;name=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;import &lt;/span&gt;&lt;span style="color:red;"&gt;namespace=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;import &lt;/span&gt;&lt;span style="color:red;"&gt;namespace=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;    string tableName = &amp;quot;CustomerTypes&amp;quot;;&lt;br /&gt;    string idColumnName = &amp;quot;CustomerTypeID&amp;quot;;&lt;br /&gt;    string valueColumnName = &amp;quot;Value&amp;quot;;&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:gray;"&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    public enum &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#=&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt; tableName &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;    SqlConnection sqlConn = new SqlConnection(@&amp;quot;Data Source=.\sqlexpress;Initial Catalog=TaskList;Integrated Security=True&amp;quot;);&lt;br /&gt;    sqlConn.Open();&lt;br /&gt;    string sql = string.Format(&amp;quot;SELECT {0}, {1} FROM {2} ORDER BY {0}&amp;quot;, idColumnName, valueColumnName, tableName);&lt;br /&gt;    SqlCommand sqlComm = new SqlCommand(sql, sqlConn);&lt;br /&gt;&lt;br /&gt;    IDataReader reader = sqlComm.ExecuteReader(CommandBehavior.CloseConnection);&lt;br /&gt;&lt;br /&gt;    System.Text.StringBuilder sb = new System.Text.StringBuilder();&lt;br /&gt;&lt;br /&gt;    while (reader.Read())&lt;br /&gt;    {&lt;br /&gt;        sb.Append(&amp;quot;\t&lt;/span&gt;\&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;t&amp;quot; + reader[valueColumnName] + &amp;quot; = &amp;quot; + reader[idColumnName] + &amp;quot;,&amp;quot; + Environment.NewLine);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    sb.Remove(sb.Length - 3, 3);&lt;br /&gt;&lt;br /&gt;    sqlComm.Dispose();&lt;br /&gt;    sqlConn.Dispose();&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#=&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt; sb &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;The template above will generate an enum like the following:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;public enum &lt;/span&gt;&lt;span&gt;CustomerTypes&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;&lt;br /&gt;        Good = 0,&lt;br /&gt;        Bad = 1,&lt;br /&gt;        Ugly = 2&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;There are two drawbacks with the template above though. The first is that it uses the table name for the enum name, which means the enum might be a plural if you follow the table-names-as-plurals convention, whereas I only make an enum a plural if it is a flag (i.e. it can contain a combination of values). A lot of people don&amp;#39;t follow the same conventions, so I&amp;#39;m not going to try solve this issue here.
&lt;/p&gt;&lt;p&gt;The second, and more important, problem is that the template above means you need to have a copy of it for each lookup table in your database that you want to create an enum from. I&amp;#39;ve amended the template to cater for multiple, specific tables instead and to put these into one file. The new version appears below:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;template &lt;/span&gt;&lt;span style="color:red;"&gt;language=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;c#&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;output &lt;/span&gt;&lt;span style="color:red;"&gt;extension=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;.cs&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;assembly &lt;/span&gt;&lt;span style="color:red;"&gt;name=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;import &lt;/span&gt;&lt;span style="color:red;"&gt;namespace=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#@&lt;/span&gt;&lt;span style="color:red;"&gt; &lt;/span&gt;&lt;span style="color:brown;"&gt;import &lt;/span&gt;&lt;span style="color:red;"&gt;namespace=&lt;/span&gt;&amp;quot;&lt;span style="color:blue;"&gt;System.Data.SqlClient&lt;/span&gt;&amp;quot; &lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;    string[] tableNames            = { &amp;quot;CustomerTypes&amp;quot;,    &amp;quot;TaskTypes&amp;quot; };&lt;br /&gt;    string[] idColumnNames        = { &amp;quot;CustomerTypeID&amp;quot;,    &amp;quot;TaskTypeID&amp;quot; };&lt;br /&gt;    string[] valueColumnNames    = { &amp;quot;Value&amp;quot;,            &amp;quot;Value&amp;quot; };&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:gray;"&gt;using System;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;    SqlConnection sqlConn = new SqlConnection(@&amp;quot;Data Source=.\sqlexpress;Initial Catalog=TaskList;Integrated Security=True&amp;quot;);&lt;br /&gt;    sqlConn.Open();&lt;br /&gt;&lt;br /&gt;    for (int i = 0; i &amp;lt; tableNames.Length; i++)&lt;br /&gt;    {&lt;br /&gt;        string tableName = tableNames&lt;img src="http://dotnet.org.za/emoticons/emotion-55.gif" alt="Idea" /&gt;;&lt;br /&gt;        string idColumnName = idColumnNames&lt;img src="http://dotnet.org.za/emoticons/emotion-55.gif" alt="Idea" /&gt;;&lt;br /&gt;        string valueColumnName = valueColumnNames&lt;img src="http://dotnet.org.za/emoticons/emotion-55.gif" alt="Idea" /&gt;;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;public enum &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#=&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt; tableName &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;        string sql = string.Format(&amp;quot;SELECT {0}, {1} FROM {2} ORDER BY {0}&amp;quot;, idColumnName, valueColumnName, tableName);&lt;br /&gt;        SqlCommand sqlComm = new SqlCommand(sql, sqlConn);&lt;br /&gt;&lt;br /&gt;        IDataReader reader = sqlComm.ExecuteReader();&lt;br /&gt;&lt;br /&gt;        System.Text.StringBuilder sb = new System.Text.StringBuilder();&lt;br /&gt;&lt;br /&gt;        while (reader.Read())&lt;br /&gt;        {&lt;br /&gt;            sb.Append(&amp;quot;\t&lt;/span&gt;\&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;t&amp;quot; + reader[valueColumnName] + &amp;quot; = &amp;quot; + reader[idColumnName] + &amp;quot;,&amp;quot; + Environment.NewLine);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        sb.Remove(sb.Length - 3, 3);&lt;br /&gt;&lt;br /&gt;        reader.Close();&lt;br /&gt;&lt;br /&gt;        sqlComm.Dispose();&lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&amp;lt;#=&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;        sb &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:red;"&gt;    &lt;/span&gt;&lt;span style="color:gray;"&gt;}&lt;br /&gt;    &lt;br /&gt;&lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&amp;lt;#&lt;br /&gt;&lt;/span&gt;&lt;span style="-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;    }&lt;br /&gt;    &lt;br /&gt;    sqlConn.Dispose(); &lt;/span&gt;&lt;span style="background:gold none repeat scroll 0% 0%;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;#&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:gray;"&gt;}&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;and it will generate a set of enums like this:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;using &lt;/span&gt;System;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;namespace &lt;/span&gt;ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:blue;"&gt;public enum &lt;/span&gt;&lt;span&gt;CustomerTypes&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        Good = 0,&lt;br /&gt;        Bad = 1,&lt;br /&gt;        Ugly = 2&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color:blue;"&gt;public enum &lt;/span&gt;&lt;span&gt;TaskTypes&lt;br /&gt;    &lt;/span&gt;{&lt;br /&gt;        Bug = 0,&lt;br /&gt;        Task = 1,&lt;br /&gt;        Enhancement = 2&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;}&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;;subject=Generating+Enums+From+Database+Tables" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;;title=Generating+Enums+From+Database+Tables" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;title=Generating+Enums+From+Database+Tables" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;;title=Generating+Enums+From+Database+Tables" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx&amp;amp;;title=Generating+Enums+From+Database+Tables&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=513463" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Linq/default.aspx">Linq</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Visual+Studio+Extensibility/default.aspx">Visual Studio Extensibility</category><category domain="http://dotnet.org.za/hiltong/archive/tags/VSX/default.aspx">VSX</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Code+Generation/default.aspx">Code Generation</category><category domain="http://dotnet.org.za/hiltong/archive/tags/T4/default.aspx">T4</category></item><item><title>Using Enums With LINQ To SQL</title><link>http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx</link><pubDate>Wed, 06 Aug 2008 13:40:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:513275</guid><dc:creator>hiltong</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=513275</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx#comments</comments><description>&lt;p&gt;I don&amp;#39;t know about you, but I&amp;#39;m quite a fan of using &lt;a href="http://msdn.microsoft.com/en-us/library/sbbt4032.aspx"&gt;Enumerations&lt;/a&gt; (Enums) in my apps. I&amp;#39;m all for more readable, more explicit code because I think it helps a lot with maintainability, and enums help with that. I&amp;#39;d much rather read a line of code that says:&lt;/p&gt;&lt;pre class="code"&gt;customer.CustomerType = &lt;span&gt;CustomerType&lt;/span&gt;.Good;&lt;/pre&gt;
&lt;p&gt;than&lt;/p&gt;
&lt;p&gt;customer.CustomerType = 1;&lt;/p&gt;
&lt;p&gt;Of course, it means you also get Intellisense when you&amp;#39;re writing the code. Another advantage is that enums, which are usually lookup types and very often bound to controls like comboboxes, will come down &lt;i&gt;as part of the schema&lt;/i&gt; for your web service, negating calls to get the values.&lt;/p&gt;
&lt;p&gt;So how can we make use of enums in LINQ To SQL? Actually, it&amp;#39;s pretty easy.&lt;/p&gt;
&lt;h2&gt;Step 1: Create The Enum&lt;/h2&gt;
&lt;p&gt;This part should be familiar, as it&amp;#39;s just a standard enum. I&amp;#39;m going to be working with Northwind and adding a CustomerType enum. Mine appears as follows:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;public enum &lt;/span&gt;&lt;span&gt;CustomerType&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    Good = 1,&lt;br /&gt;    Bad = 2,&lt;br /&gt;    Ugly = 3&lt;br /&gt;}&lt;/pre&gt;
&lt;h2&gt;Step 2: Add The New Column To Customers&lt;/h2&gt;
&lt;p&gt;The next step is to add the new column to your Customers table. In the database, just add it as a regular integer column:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/AddingColumn_2.png"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/AddingColumn_thumb.png" style="border:0px none;" alt="AddingColumn" width="428" border="0" height="404" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; you can add an actual table into your database to hold these types as well, like a CustomerTypes table, but it&amp;#39;s not strictly necessary. I would recommend doing so though and adding a foreign key reference to the Customers table, as it helps for things like reporting straight off your database.&lt;/p&gt;
&lt;p&gt;Once you&amp;#39;ve done this, you&amp;#39;ll need to add the property to your LINQ To SQL domain object. You can do this on the designer by dragging the new field onto an empty space on the designer. You&amp;#39;ll get a duplicate copy of Customer (&amp;quot;Customer1&amp;quot; probably), then you can cut and paste the property onto the original entity. &lt;i&gt;Obviously, you only need to do all this if you have an existing entity you&amp;#39;re adding to.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/AddingColumnToEntity_2.png"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/AddingColumnToEntity_thumb.png" style="border:0px none;" alt="AddingColumnToEntity" width="492" border="0" height="319" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The next step is critical. By default, the Type will come up as an &amp;quot;int (System.Int32)&amp;quot;, but you can change it to the fully-qualified type of the enum (in my case, ConsoleApplication1.CustomerType). &lt;b&gt;BUT&lt;/b&gt;, in order to locate it fully, you &lt;i&gt;have to add the global identifier&lt;/i&gt;, as follows: global::ConsoleApplication1.CustomerType , so type that as is (but the equivalent for your namespace) into the textbox, as below:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/ChangeEnumType_2.png"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/UsingEnumsWithLINQToSQL_D45D/ChangeEnumType_thumb.png" style="border:0px none;" alt="ChangeEnumType" width="460" border="0" height="365" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;That&amp;#39;s it! You should now be able to use enums in your code directly, like we saw at the beginning. What&amp;#39;s also cool is that you can now use them in your LINQ To SQL queries as well, like:&lt;/p&gt;&lt;pre class="code"&gt;&lt;span style="color:blue;"&gt;var &lt;/span&gt;customers = &lt;span style="color:blue;"&gt;from &lt;/span&gt;c &lt;span style="color:blue;"&gt;in &lt;/span&gt;dc.Customers&lt;br /&gt;                &lt;span style="color:blue;"&gt;where &lt;/span&gt;c.CustomerType == &lt;span&gt;CustomerType&lt;/span&gt;.Good&lt;br /&gt;                &lt;span style="color:blue;"&gt;select &lt;/span&gt;c;&lt;/pre&gt;&lt;pre class="code"&gt;&lt;span style="font-weight:bold;"&gt;UPDATE:&lt;/span&gt; Here&amp;#39;s a post on &lt;a href="http://dotnet.org.za/hiltong/archive/2008/08/06/generating-enums-from-database-tables.aspx" target="_blank"&gt;how you can generate the enum classes automatically from your database tables&lt;/a&gt;.&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;;subject=Using+Enums+With+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;;title=Using+Enums+With+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;title=Using+Enums+With+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;;title=Using+Enums+With+LINQ+To+SQL" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx&amp;amp;;title=Using+Enums+With+LINQ+To+SQL&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/using-enums-with-linq-to-sql.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=513275" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Linq/default.aspx">Linq</category></item><item><title>SQL Server 2008 RTMs Today!</title><link>http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx</link><pubDate>Wed, 06 Aug 2008 11:51:53 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:513114</guid><dc:creator>hiltong</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=513114</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx#comments</comments><description>&lt;p&gt;Wow, a fresh announcement at Tech Ed South Africa for a change - apparently SQL Server 2008 RTMs today :-)&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;;subject=SQL+Server+2008+RTMs+Today!" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;;title=SQL+Server+2008+RTMs+Today!" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;title=SQL+Server+2008+RTMs+Today!" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;;title=SQL+Server+2008+RTMs+Today!" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx&amp;amp;;title=SQL+Server+2008+RTMs+Today!&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/06/sql-server-2008-rtms-today.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=513114" width="1" height="1"&gt;</description></item><item><title>For Open Source: LAMP; For MS: ...</title><link>http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx</link><pubDate>Mon, 04 Aug 2008 15:27:55 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:509675</guid><dc:creator>hiltong</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=509675</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m sure many of you have heard about a very common open source acronym: &lt;a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)"&gt;LAMP&lt;/a&gt;. If you haven&amp;#39;t, it&amp;#39;s an acronym for &lt;strong&gt;L&lt;/strong&gt;inux, &lt;strong&gt;A&lt;/strong&gt;pache, &lt;strong&gt;M&lt;/strong&gt;ySQL and &lt;strong&gt;P&lt;/strong&gt;HP. MS doesn&amp;#39;t seem to have a nice acronym for its stack, but at the same time it&amp;#39;s got some new and emerging technologies that I think are going to be a very powerful triad of tools. These are:&lt;/p&gt; &lt;p&gt;1) LINQ To SQL - what can I say, &lt;a href="http://dotnet.org.za/hiltong/archive/tags/Linq/default.aspx"&gt;I&amp;#39;m clearly a fan&lt;/a&gt;. I haven&amp;#39;t spent all that much time with &lt;a href="http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx"&gt;Entity Framework&lt;/a&gt;, but I&amp;#39;ve seen that not everyone is happy with it (see this &lt;a href="http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/"&gt;no confidence vote for instance&lt;/a&gt;. Make sure to &lt;a href="http://blogs.msdn.com/timmall/archive/2008/06/24/vote-of-no-confidence.aspx"&gt;read Microsoft&amp;#39;s response too though&lt;/a&gt;). I have a feeling that LINQ To SQL may come to outstrip E.F. in terms of uptake (aside from the fact that it&amp;#39;s been released earlier, but also because it&amp;#39;s more simple).&lt;/p&gt; &lt;p&gt;2) WCF - It&amp;#39;s the best communications stack MS has, and it&amp;#39;s going to be around a while, as far as I can see. It may depend on how &lt;a href="http://astoria.mslivelabs.com/"&gt;Astoria (ADO.Net Data Services)&lt;/a&gt; plays out though...&lt;/p&gt; &lt;p&gt;3) &lt;a href="http://www.silverlight.net/"&gt;Silverlight&lt;/a&gt; (specifically 2.0). The story around &lt;em&gt;finally&lt;/em&gt; being able to build .net cross platform UIs in the browser - what more can I say.&lt;/p&gt; &lt;p&gt;So, with this, I propose the new Microsoft stack acronym - LWS (pronounced &amp;#39;Lewis&amp;#39;). Who&amp;#39;s with me!? :-&amp;gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;;subject=For+Open+Source%3a+LAMP%3b+For+MS%3a+..." target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;;title=For+Open+Source%3a+LAMP%3b+For+MS%3a+..." target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;title=For+Open+Source%3a+LAMP%3b+For+MS%3a+..." target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;;title=For+Open+Source%3a+LAMP%3b+For+MS%3a+..." target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx&amp;amp;;title=For+Open+Source%3a+LAMP%3b+For+MS%3a+...&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/08/04/for-open-source-lamp-for-ms.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=509675" width="1" height="1"&gt;</description></item><item><title>Tech Ed South Africa 2008</title><link>http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx</link><pubDate>Mon, 28 Jul 2008 07:28:54 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:495773</guid><dc:creator>hiltong</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=495773</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;m putting the finishing touches on my sessions for &lt;a href="http://www.teched.co.za/"&gt;Tech Ed South Africa&lt;/a&gt; next week. If you haven&amp;#39;t booked yet, there are still some places, it seems, so book now (good luck getting flights from C.T. though!)&lt;/p&gt; &lt;p&gt;I&amp;#39;ll be giving a couple of sessions this year, so I hope to see you there. My breakout sessions are:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;WEB303 - Performance and Scalability in ASP.NET Development&lt;/li&gt; &lt;li&gt;DEV310 - Understanding LINQ To SQL&lt;/li&gt; &lt;li&gt;SOA203 - Introduction to Windows Workflow Foundation&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;And I&amp;#39;ll be giving the following Chalk &amp;#39;n Talks:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;CNT230 - Developing Solutions with LINQ To SQL – Lessons From The Trenches&lt;/li&gt; &lt;li&gt;CNT234 - Practical Code Generation With Microsoft&amp;#39;s T4 Engine&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The full agenda for Tech Ed is at &lt;a title="http://www.teched.co.za/agenda.aspx" href="http://www.teched.co.za/agenda.aspx"&gt;http://www.teched.co.za/agenda.aspx&lt;/a&gt;. There are a &lt;strong&gt;lot&lt;/strong&gt; of sessions this year, so it should be a bumper event.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;;subject=Tech+Ed+South+Africa+2008" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;;title=Tech+Ed+South+Africa+2008" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;title=Tech+Ed+South+Africa+2008" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;;title=Tech+Ed+South+Africa+2008" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx&amp;amp;;title=Tech+Ed+South+Africa+2008&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/28/tech-ed-south-africa-2008.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=495773" width="1" height="1"&gt;</description></item><item><title>Visual Studio eXtensibility (VSX) Video - How Do I: Add Code Snippets to My Language Service?</title><link>http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx</link><pubDate>Thu, 24 Jul 2008 11:41:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:490024</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In this &lt;a href="http://msdn.microsoft.com/en-gb/vstudio/bb507746.aspx"&gt;VSX How Do I Video&lt;/a&gt;, we look at how to add Code Snippet functionality to your language service.&lt;/p&gt; &lt;p&gt;For reasons unbeknownst to me, MS have not yet posted the actual initial video on Language Services in 2008 yet *-&amp;gt;.&lt;/p&gt; &lt;p&gt;Screen shot for code snippets:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIA_C09B/Screenshot_2.jpg"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIA_C09B/Screenshot_thumb.jpg" style="border:0px none;" alt="How to add Code Snippets" width="1028" border="0" height="772" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;;subject=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Code+Snippets+to+My+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Code+Snippets+to+My+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Code+Snippets+to+My+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Code+Snippets+to+My+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Code+Snippets+to+My+Language+Service%3f&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-code-snippets-to-my-language-service.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=490024" width="1" height="1"&gt;</description></item><item><title>Visual Studio eXtensibility (VSX) Video - How Do I: Add Intellisense to a Language Service?</title><link>http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx</link><pubDate>Thu, 24 Jul 2008 11:37:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:490015</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;In this video, I cover how to add &lt;a href="http://msdn.microsoft.com/en-us/vstudio/cc709419.aspx"&gt;Intellisense functionality to your custom language service&lt;/a&gt;. The video covers Statement/Word Completion and QuickInfo. I can see this coming to a &lt;a href="http://www.iunknown.com/2007/11/lolcode-on-dlr.html"&gt;LOLCode&lt;/a&gt; Language Service near you!&lt;/p&gt; &lt;p&gt;Here&amp;#39;s a screen shot:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIA_BF82/Screenshot_2.jpg"&gt;&lt;img src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIA_BF82/Screenshot_thumb.jpg" style="border:0px none;" alt="Screenshot" width="1028" border="0" height="772" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;;subject=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Intellisense+to+a+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Intellisense+to+a+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Intellisense+to+a+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Intellisense+to+a+Language+Service%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Add+Intellisense+to+a+Language+Service%3f&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-add-intellisense-to-a-language-service.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=490015" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Visual+Studio+Extensibility/default.aspx">Visual Studio Extensibility</category><category domain="http://dotnet.org.za/hiltong/archive/tags/VSX/default.aspx">VSX</category></item><item><title>Visual Studio eXtensibility (VSX) Video - How Do I: Work With Other Combo Box Types?</title><link>http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx</link><pubDate>Thu, 24 Jul 2008 11:29:03 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:490008</guid><dc:creator>hiltong</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=490008</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been a bit bogged down, so I haven&amp;#39;t noticed some of the recent &lt;a href="http://msdn.microsoft.com/en-gb/vstudio/bb507746.aspx"&gt;Visual Studio eXtensibility (VSX) How Do I videos&lt;/a&gt; going live. I see that &lt;a href="http://msdn.microsoft.com/en-us/vstudio/cc719157.aspx"&gt;How Do I: Work With Other Combo Box Types?&lt;/a&gt; is now available. It&amp;#39;s a follow on to an earlier video which covered adding a standard combo box, and it includes adding an Indexed Combo, a Most-Recently Used (MRU) Combo (like the Find combo in Visual Studio) and a Dynamic Combo (Like the Zoom combo in most PDF viewers).&lt;/p&gt; &lt;p&gt;Here&amp;#39;s a screenshot:&lt;/p&gt; &lt;p&gt;&lt;a href="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIW_BD75/Screenshot_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="772" alt="Screenshot" src="http://dotnet.org.za/blogs/hiltong/WindowsLiveWriter/VisualStudioeXtensibilityVSXVideoHowDoIW_BD75/Screenshot_thumb.jpg" width="1028" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;;subject=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Work+With+Other+Combo+Box+Types%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Work+With+Other+Combo+Box+Types%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Work+With+Other+Combo+Box+Types%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Work+With+Other+Combo+Box+Types%3f" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx&amp;amp;;title=Visual+Studio+eXtensibility+(VSX)+Video+-+How+Do+I%3a+Work+With+Other+Combo+Box+Types%3f&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/24/visual-studio-extensibility-vsx-video-how-do-i-work-with-other-combo-box-types.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=490008" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Visual+Studio+Extensibility/default.aspx">Visual Studio Extensibility</category><category domain="http://dotnet.org.za/hiltong/archive/tags/VSX/default.aspx">VSX</category></item><item><title>Displaying LINQ To SQL's Actual SQL Queries in your ASP.NET Page</title><link>http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx</link><pubDate>Wed, 16 Jul 2008 09:54:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:482010</guid><dc:creator>hiltong</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://dotnet.org.za/hiltong/rsscomments.aspx?PostID=482010</wfw:commentRss><comments>http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve made use of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.data.linq.datacontext.log.aspx" target="_blank"&gt;Log&lt;/a&gt; property on the DataContext class in a few of my &lt;a href="http://hilton.giesenow.com/archive/tags/Linq/default.aspx"&gt;LINQ To SQL posts&lt;/a&gt;. Usually, it&amp;#39;s been in a console application, and we&amp;#39;re just looking at the SQL output in the console window, so we use:&lt;/p&gt;&lt;pre class="code"&gt;dataContext.Log = &lt;span&gt;Console&lt;/span&gt;.Out;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;However, in a web application, this won&amp;#39;t help. If you want to see the output of your SQL directly in the page, you can use:&lt;/p&gt;&lt;pre class="code"&gt;System.IO.&lt;span&gt;StreamWriter &lt;/span&gt;httpResponseStreamWriter = &lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span&gt;StreamWriter&lt;/span&gt;(&lt;span&gt;HttpContext&lt;/span&gt;.Current.Response.OutputStream);&lt;br /&gt;dc.Log = httpResponseStreamWriter;&lt;/pre&gt;
&lt;p&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;As to whether it&amp;#39;s a good idea to display this directly into the output (effectively Response.Write) - that&amp;#39;s up to you ;-&amp;gt;. As an alternative, as Log is just expecting a TextWriter, you could use a StringBuilder with a StringWriter, and then display it&amp;#39;s output in a label.&lt;/p&gt;
&lt;p&gt;For a more robust solution, &lt;a href="http://www.u2u.info/Blogs/Kris"&gt;Kris Vandermotten&lt;/a&gt; has a sample on &lt;a href="http://www.u2u.info/Blogs/Kris/Lists/Posts/Post.aspx?ID=11"&gt;Sending the LINQ To SQL log to the debugger output window&lt;/a&gt;.&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;;subject=Displaying+LINQ+To+SQL%27s+Actual+SQL+Queries+in+your+ASP.NET+Page" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;;title=Displaying+LINQ+To+SQL%27s+Actual+SQL+Queries+in+your+ASP.NET+Page" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;title=Displaying+LINQ+To+SQL%27s+Actual+SQL+Queries+in+your+ASP.NET+Page" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;;title=Displaying+LINQ+To+SQL%27s+Actual+SQL+Queries+in+your+ASP.NET+Page" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx&amp;amp;;title=Displaying+LINQ+To+SQL%27s+Actual+SQL+Queries+in+your+ASP.NET+Page&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/07/16/displaying-linq-to-sql-s-actual-sql-queries-in-your-asp-net-page.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=482010" width="1" height="1"&gt;</description><category domain="http://dotnet.org.za/hiltong/archive/tags/Development/default.aspx">Development</category><category domain="http://dotnet.org.za/hiltong/archive/tags/Linq/default.aspx">Linq</category></item><item><title>Reminder - Brad Abrams on MVC</title><link>http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx</link><pubDate>Fri, 20 Jun 2008 07:25:00 GMT</pubDate><guid isPermaLink="false">2d3a9e08-b70c-4031-ba2b-8f5282a2a59a:460069</guid><dc:creator>hiltong</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Just a reminder that Brad Abrams will be visiting us and giving a talk for SA Dev on ASP.NET MVC.&lt;/p&gt; &lt;p&gt;Final event details:&lt;/p&gt; &lt;p&gt;&lt;b&gt;Date&lt;/b&gt;: 25&lt;sup&gt;th&lt;/sup&gt; June, 2008&lt;br /&gt;&lt;b&gt;Time&lt;/b&gt;: 18:15 for 18:30&lt;br /&gt;&lt;b&gt;Venue: &lt;/b&gt;Microsoft Cape Town (Please note the address)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Golf Park 3, Engen House, Raapenberg Road, Mowbray &lt;/p&gt;&lt;p&gt;Also, please RSVP if you haven&amp;#39;t done so already&lt;/p&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;;subject=Reminder+-+Brad+Abrams+on+MVC" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;;title=Reminder+-+Brad+Abrams+on+MVC" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;title=Reminder+-+Brad+Abrams+on+MVC" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;;title=Reminder+-+Brad+Abrams+on+MVC" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx&amp;amp;;title=Reminder+-+Brad+Abrams+on+MVC&amp;amp;;top=1" target="_blank" title = "Post http://dotnet.org.za/hiltong/archive/2008/06/20/reminder-brad-abrams-on-mvc.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://dotnet.org.za/aggbug.aspx?PostID=460069" width="1" height="1"&gt;</description></item></channel></rss>