<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET</title>
        <link>http://agilior.pt/blogs/rodrigo.guerreiro/category/11.aspx</link>
        <description>.NET</description>
        <language>pt-PT</language>
        <copyright>Rodrigo Guerreiro</copyright>
        <managingEditor>rodrigo.guerreiro@agilior.pt</managingEditor>
        <generator>Subtext Version 1.9.0.27</generator>
        <item>
            <title>ASP.NET MVC RC2 + xUnit + Gallio</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2009/03/04/7199.aspx</link>
            <description>&lt;p&gt;In &lt;a href="http://haacked.com/archive/2009/03/03/aspnetmvc-changes-for-rc2.aspx"&gt;case you didn't notice&lt;/a&gt;, &lt;a href="http://go.microsoft.com/fwlink/?LinkId=144443"&gt;ASP.NET MVC RC2 is out&lt;/a&gt;. Following that release, I've decided to create a new ASP.NET MVC project, but using &lt;a href="http://xunit.codeplex.com"&gt;xUnit&lt;/a&gt; instead of &lt;a href="http://en.wikipedia.org/wiki/MSTest"&gt;MSTest&lt;/a&gt; for the test framework. I also want this change to have no impact in the way I develop, which means that I want the unit tests to run inside &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/products/default.aspx"&gt;Visual Studio 2008&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Why xUnit?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://xunit.codeplex.com/Wiki/View.aspx?title=WhyDidWeBuildXunit&amp;amp;referringTitle=Home"&gt;Here's why&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Introducing Gallio&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;From &lt;a href="http://www.gallio.org"&gt;Gallio&lt;/a&gt; homepage:  &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;&lt;em&gt;The Gallio Automation Platform is an open, extensible, and neutral system for .NET that provides a common object model, runtime services and tools (such as test runners) that may be leveraged by any number of test frameworks.&lt;/em&gt;  &lt;/p&gt;&lt;p&gt;&lt;em&gt;The Gallio platform seeks to facilitate the creation of a rich ecosystem of interoperable testing tools produced by and for the community at large so as to address a far wider range of testing needs than any previous independent testing framework has done before. Unit tests, integration tests, performance tests, and even semi-automated test harnesses should all be able to leverage common facilities where appropriate. Moreover, they should present consistent interfaces to the world so that they can easily be integrated into the systems and processes of the enterprise.&lt;/em&gt;  &lt;/p&gt;&lt;p&gt;&lt;em&gt;At present Gallio can run tests from &lt;/em&gt;&lt;a href="http://www.mbunit.com"&gt;&lt;em&gt;MbUnit&lt;/em&gt;&lt;/a&gt;&lt;em&gt; versions 2 and 3, &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms182486.aspx"&gt;&lt;em&gt;MSTest&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://nbehave.org/"&gt;&lt;em&gt;NBehave&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.nunit.org/index.php"&gt;&lt;em&gt;NUnit&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.codeplex.com/xunit"&gt;&lt;em&gt;xUnit.Net&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, and &lt;/em&gt;&lt;a href="http://www.csunit.org/"&gt;&lt;em&gt;csUnit&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.  Gallio provides tool support and integration with &lt;/em&gt;&lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET"&gt;&lt;em&gt;CCNet&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/0k6kkbsd.aspx"&gt;&lt;em&gt;MSBuild&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://nant.sourceforge.net/"&gt;&lt;em&gt;NAnt&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.ncover.com/"&gt;&lt;em&gt;NCover&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://research.microsoft.com/Pex/"&gt;&lt;em&gt;Pex&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;&lt;em&gt;Powershell&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.jetbrains.com/resharper/index.html"&gt;&lt;em&gt;Resharper&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.testdriven.net/"&gt;&lt;em&gt;TestDriven.Net&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, &lt;/em&gt;&lt;a href="http://www.typemock.com/"&gt;&lt;em&gt;TypeMock&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, and &lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/vsts2008/products/default.aspx"&gt;&lt;em&gt;Visual Studio Team System&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Combining all together&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;DISCLAIMER: The following steps are provided "as is" without any warranty or support. Use this under your own responsibility. Also, this only works in &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/products/default.aspx"&gt;Visual Studio 2008 Team System&lt;/a&gt; and I'm assuming that you already have the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=144443"&gt;ASP.NET MVC RC2&lt;/a&gt; installed (but I assume that this also works with RC1 but I haven't test it).&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;1. Download &lt;a href="http://xunit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=16811#ReleaseFiles"&gt;xUnit&lt;/a&gt; (xunit-1.1.zip) and &lt;a href="http://mb-unit.googlecode.com/files/GallioBundle-3.0.5.546-Setup-x86.msi"&gt;Gallio&lt;/a&gt; latest releases. &lt;/p&gt; &lt;p&gt;2. Unzip the xUnit file and run the &lt;em&gt;xunit.installer.exe&lt;/em&gt;. In the ASP.NET MVC section click on the &lt;em&gt;Enable&lt;/em&gt; button (case it's enabled which in this case you'll need to do nothing) and you'll get the green result, like in the picture below.&lt;/p&gt; &lt;p&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="270" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb.png" width="287" border="0" /&gt;  &lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="272" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_1.png" width="394" border="0" /&gt;&lt;/a&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;3. Execute the downloaded &lt;em&gt;GallioBundle-3.0.5.546-Setup-x86.msi&lt;/em&gt; installer and follow the instructions. &lt;/p&gt; &lt;p&gt;4. Create a new ASP.NET MVC project.  When the below screen appears you're now able to choose the xUnit as the test framework. Click OK.&lt;/p&gt; &lt;p&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_6.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="314" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_2.png" width="455" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;5. Now the tricky part. Unload the test project (right-click on the project and choose the &lt;em&gt;Unload project&lt;/em&gt; option).&lt;/p&gt; &lt;p&gt;6. Right-click on the unloaded project and choose &lt;em&gt;Edit...csproj&lt;/em&gt; and you'll get something like this:&lt;/p&gt; &lt;p&gt; &lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_8.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="267" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_3.png" width="693" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;7. Right below the &lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_10.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="16" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_4.png" width="240" border="0" /&gt;&lt;/a&gt;  element paste this.&lt;/p&gt; &lt;div&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ProjectTypeGuids&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;  &lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div&gt;8. Save and reload the project.&lt;/div&gt;
&lt;div&gt;9. Build the solution. Probably you'll get the errors below (if not go to step 10). This happens because the xUnit project templates are built for the ASP.NET MVC RC1 and we're using the ASP.NET MVC RC2. Simply add references in the test project to the assembly System.Web.Routing and System.Web.Abstractions. See the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=137662"&gt;release notes&lt;/a&gt; in case you're interested knowing what changed. Basically, this assemblies are no longer distributed with the MVC installer because are already shipped with .NET Framework 3.5 SP1.&lt;/div&gt;
&lt;div&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_12.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="175" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_5.png" width="698" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;10. Build again the solution and hopefully all goes OK.&lt;/div&gt;
&lt;div&gt;11. Now go to Test-&amp;gt;Windows-&amp;gt;Test View. Again, this only works in &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/products/default.aspx"&gt;Visual Studio 2008 Team System&lt;/a&gt;. With luck you'll have 9 unit tests.&lt;/div&gt;
&lt;div&gt;12. Select all and run. You're now running the tests successfully inside the &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/products/default.aspx"&gt;Visual Studio 2008&lt;/a&gt; with &lt;a href="http://www.gallio.org"&gt;Gallio&lt;/a&gt; (Check the icon between the checkbox and the result column). &lt;/div&gt;
&lt;div&gt;The two last tests are failing, once again, because are built for the RC1. I'll leave the resolution to you :)&lt;/div&gt;
&lt;div&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_14.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="212" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/ASP.NETMVCxUnitGallio_AB50/image_thumb_6.png" width="350" border="0" /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Success! Hope this helps someone.&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Until next time ;)&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:499c57f2-f922-48d8-be33-5643c23e0c89" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/asp.net%20mvc" rel="tag"&gt;asp.net mvc&lt;/a&gt;, &lt;a href="http://technorati.com/tags/gallio" rel="tag"&gt;gallio&lt;/a&gt;, &lt;a href="http://technorati.com/tags/unit%20test" rel="tag"&gt;unit test&lt;/a&gt;, &lt;a href="http://technorati.com/tags/xunit" rel="tag"&gt;xunit&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/7199.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2009/03/04/7199.aspx</guid>
            <pubDate>Wed, 04 Mar 2009 10:35:15 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/7199.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2009/03/04/7199.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/7199.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/7199.aspx</trackback:ping>
        </item>
        <item>
            <title>Email address format validation in XSD schemas</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/11/14/5965.aspx</link>
            <description>&lt;p&gt;&lt;em&gt;I know that I owe you, my faithful readers (which BTW my last reports tells me that in total are...hum...zero), a couple of posts since August. I promise that I'll try to keep you (I mean...no one) updated with my recent thoughts :)&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Back to the real post...&lt;/p&gt; &lt;p&gt;Yesterday, in one of our clients, we found out a real nice and tricky bug. In the BizTalk solution we have a message schema that looks something like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/EmailaddressformatvalidationinXSDschemas_FE9F/image_2.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="215" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/EmailaddressformatvalidationinXSDschemas_FE9F/image_thumb.png" width="481" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;It's typical to insert a validation rule in the email. So, the &lt;strong&gt;Email&lt;/strong&gt; field should look something like this:&lt;/p&gt; &lt;p&gt; &lt;a href="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/EmailaddressformatvalidationinXSDschemas_FE9F/image_4.png"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="298" alt="image" src="http://agilior.pt/blogs/images/agilior_pt/blogs/rodrigo.guerreiro/WindowsLiveWriter/EmailaddressformatvalidationinXSDschemas_FE9F/image_thumb_1.png" width="443" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;In case you're wondering, this is done by setting the &lt;strong&gt;Base Data Type&lt;/strong&gt; property with &lt;em&gt;xs:string&lt;/em&gt;, setting the &lt;strong&gt;Data Type&lt;/strong&gt; property with "Email" (just write it out) and paste "\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" (without the ") into the &lt;strong&gt;Pattern&lt;/strong&gt; property.&lt;/p&gt; &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa562170.aspx"&gt;Now let's generate an instance of this schema&lt;/a&gt;. One example that's complaint with this schema could be:&lt;/p&gt; &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt; &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:Person&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:ns0&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://TestingEmailAddressFormat.Message"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;John Doe&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Address&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Lisbon street, 1&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Address&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Phone&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;555-5555&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Phone&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Email&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;johndoe@somewhere.com&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Email&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:Person&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you &lt;a href="http://msdn.microsoft.com/en-us/library/aa577644.aspx"&gt;validate this XML against our schema&lt;/a&gt; you'll get the message &lt;em&gt;"Validate Instance succeeded for schema Person.xsd..."&lt;/em&gt;. Perfect!&lt;/p&gt;
&lt;p&gt;But let's perform a small change in &lt;strong&gt;Email&lt;/strong&gt; field:&lt;/p&gt;
&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;
&lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:Person&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:ns0&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://TestingEmailAddressFormat.Message"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;John Doe&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Address&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Lisbon street, 1&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Address&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Phone&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;555-5555&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Phone&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Email&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;john_doe@somewhere.com&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Email&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ns0:Person&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Validating this won't get us that nice message of success. Instead we get something like &lt;em&gt;"error BEC2004: The 'Email' element is invalid - The value 'john_doe@somewhere.com' is invalid according to its datatype 'http://TestingEmailAddressFormat.Message:Email' - The Pattern constraint failed"&lt;/em&gt;. That's a little awkward, because we were sure that our regex expression was right. &lt;/p&gt;
&lt;p&gt;After some googling, &lt;a href="http://www.agilior.pt/blogs/bruno.camara/"&gt;Bruno&lt;/a&gt; found the reason for this error. It seems that &lt;a href="http://msdn.microsoft.com/en-us/library/20bw873z.aspx"&gt;in the .NET framework the "\w" option is equivalent to [a-zA-Z_0-9]&lt;/a&gt;. As you can see, it includes the "_" (underscore). But &lt;a href="http://msdn.microsoft.com/en-us/library/ms256191.aspx"&gt;in the XSD schemas, the "\w" option doesn't include the "_"(underscore)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Bottom line, we had to change our validation regex expression for the &lt;strong&gt;Email&lt;/strong&gt; field to "[A-Za-z0-9_]+([-+.'][A-Za-z0-9_]+)*@[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*\.[A-Za-z0-9_]+([-.][A-Za-z0-9_]+)*" (without the ").&lt;/p&gt;
&lt;p&gt;Until next time ;)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2f3b11d9-7f5b-4a83-a9a9-4b5421609c92" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/biztalk%20server%202006" rel="tag"&gt;biztalk server 2006&lt;/a&gt;, &lt;a href="http://technorati.com/tags/.net" rel="tag"&gt;.net&lt;/a&gt;, &lt;a href="http://technorati.com/tags/xsd%20shema" rel="tag"&gt;xsd shema&lt;/a&gt;, &lt;a href="http://technorati.com/tags/regex" rel="tag"&gt;regex&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/5965.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/11/14/5965.aspx</guid>
            <pubDate>Fri, 14 Nov 2008 18:52:10 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/5965.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/11/14/5965.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/5965.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/5965.aspx</trackback:ping>
        </item>
        <item>
            <title>How to edit ACL?</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/08/05/5288.aspx</link>
            <description>&lt;p&gt;I don't know about you, but I hate ACLs... &lt;/p&gt; &lt;p&gt;For Windows versions prior to Vista and according to this &lt;a href="http://msdn.microsoft.com/en-us/library/ms733768.aspx"&gt;page&lt;/a&gt; I've got to do something like this in order to edit an ACL:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;httpcfg set urlacl /u {http://URL:Port/ | https://URL:Port/} /aACL&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;where ACL should a SDDL string. Well, that's the part I HATE. I don't want to be a SDDL expert and I don't even want to understand them! Period!&lt;/p&gt;
&lt;p&gt;It seems &lt;a href="http://blogs.msdn.com/paulwh/archive/2007/05/04/addressaccessdeniedexception-http-could-not-register-url-http-8080.aspx"&gt;I'm not the only one who thinks like that&lt;/a&gt;. In his post, &lt;a href="http://blogs.msdn.com/paulwh"&gt;Paul&lt;/a&gt; gives two options how to edit an ACL in a more easier form:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Read &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2005/10/17/15632.aspx"&gt;Keith Brown's post&lt;/a&gt; how to edit the ACL programmatically; (We could use this option in order to edit the ACL when installing the service) 
&lt;/li&gt;&lt;li&gt;Use a little GUI application, called &lt;a href="http://blogs.msdn.com/paulwh/attachment/2416236.ashx"&gt;HttpNamespaceManager&lt;/a&gt;, that &lt;a href="http://blogs.msdn.com/paulwh"&gt;Paul&lt;/a&gt; developed. (I've already used it and it works smoothly)&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;Fortunately, the way how they are edited changed in Vista\Win2k8 OS:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;netsh http add urlacl url=http://+:8080/MyUri user=DOMAIN\user&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Hope this helps someone&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:adb49506-ca38-491f-9527-0a69fbbf41fe" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/acl" rel="tag"&gt;acl&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/5288.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/08/05/5288.aspx</guid>
            <pubDate>Tue, 05 Aug 2008 13:32:53 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/5288.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2008/08/05/5288.aspx#feedback</comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/5288.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/5288.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk blogs</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/12/19/3395.aspx</link>
            <description>&lt;p&gt;Microsoft recently released and aggregator for the most relevant BizTalk blogs. Check it &lt;a href="http://www.biztalkblogs.com/" target="_blank"&gt;out&lt;/a&gt;. Although it's called "BizTalk blogs" it focuses also in .NET 3.5 and other technologies.&lt;/p&gt; &lt;p&gt;My only question is: WHY MINE ISN'T THERE?? :)&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Until next time ;)&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c5f3cc12-2d78-49a4-9cef-50a01e6be84e" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/biztalk%20blogs" rel="tag"&gt;biztalk blogs&lt;/a&gt;, &lt;a href="http://technorati.com/tags/microsoft" rel="tag"&gt;microsoft&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/3395.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/12/19/3395.aspx</guid>
            <pubDate>Wed, 19 Dec 2007 08:04:05 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/3395.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/12/19/3395.aspx#feedback</comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/3395.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/3395.aspx</trackback:ping>
        </item>
        <item>
            <title>To LINQ or not to LINQ</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/11/27/3261.aspx</link>
            <description>&lt;p&gt;Some point in time, when starting a new project you'll ask some questions:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;em&gt;"What data access layer library am I going to use?"&lt;/em&gt;  &lt;/li&gt;&lt;li&gt;&lt;em&gt;"Should I develop my own?"&lt;/em&gt;  &lt;/li&gt;&lt;li&gt;&lt;em&gt;"And how about an O/R mapper?"&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;These are important questions and you should answer them. But the answer is now a little more simple to find. Since the &lt;a href="http://blogs.msdn.com/somasegar/archive/2007/11/19/visual-studio-2008-and-net-framework-3-5-shipped.aspx" target="_blank"&gt;release of .NET 3.5 last week&lt;/a&gt;, we now have built-in the framework a nice feature called LINQ.&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p align="center"&gt;&lt;em&gt;LINQ or Language INtegrated Query is a set of language and framework features that allow you to write queries directly in C#. LINQ drastically cuts the plumbing code required for database applications while reducing runtime errors (LINQ queries are statically type-checked by the compiler). LINQ can also query local in-memory collections and XML trees. Framework 3.5 ships with a lightweight new XML DOM designed for this purpose...LINQ and C# 3.0 are set to make a huge impact: LINQ to SQL alone will halve the cost of writing and maintaining a data access layer. Further, a single new query syntax works across databases, local collections, XML documents, datasets, as well as third party products. [via &lt;a href="http://www.albahari.com/nutshell/about.html" target="_blank"&gt;albahari.com&lt;/a&gt;]&lt;/em&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;One example (taken from &lt;a href="http://www.linqpad.net" target="_blank"&gt;LINQPad&lt;/a&gt;) using the northwind database for LINQ to SQL:&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2" width="1335" border="1"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td valign="top" width="632"&gt; &lt;p align="center"&gt;&lt;strong&gt;LINQ&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt; &lt;td valign="top" width="701"&gt; &lt;p align="center"&gt;&lt;strong&gt;SQL&lt;/strong&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td valign="top" width="631"&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;from p in Products&lt;br /&gt;let spanishOrders = p.OrderDetails.Where (o =&amp;gt; o.Order.ShipCountry == "Spain")&lt;br /&gt;where spanishOrders.Any()&lt;br /&gt;orderby p.ProductName&lt;br /&gt;select new&lt;br /&gt;{&lt;br /&gt;    p.ProductName,&lt;br /&gt;    p.Category.CategoryName,&lt;br /&gt;    Orders = spanishOrders.Count(),    &lt;br /&gt;    TotalValue = spanishOrders.Sum (o =&amp;gt; o.UnitPrice * o.Quantity)&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;&lt;/td&gt; &lt;td valign="top" width="701"&gt; &lt;p&gt;&lt;font face="Courier New" size="2"&gt;SELECT [t0].[ProductName], [t1].[CategoryName], (&lt;br /&gt;    SELECT COUNT(*)&lt;br /&gt;    FROM [OrderDetails] AS [t4]&lt;br /&gt;    INNER JOIN [Orders] AS [t5] ON [t5].[OrderID] = [t4].[OrderID]&lt;br /&gt;    WHERE ([t5].[ShipCountry] = @p0) AND ([t4].[ProductID] = [t0].[ProductID])&lt;br /&gt;    ) AS [Orders], (&lt;br /&gt;    SELECT SUM([t8].[value])&lt;br /&gt;    FROM (&lt;br /&gt;        SELECT [t6].[UnitPrice] * (CONVERT(Decimal(29,4),[t6].[Quantity])) AS [value], [t7].[ShipCountry], [t6].[ProductID]&lt;br /&gt;        FROM [OrderDetails] AS [t6]&lt;br /&gt;        INNER JOIN [Orders] AS [t7] ON [t7].[OrderID] = [t6].[OrderID]&lt;br /&gt;        ) AS [t8]&lt;br /&gt;    WHERE ([t8].[ShipCountry] = @p0) AND ([t8].[ProductID] = [t0].[ProductID])&lt;br /&gt;    ) AS [TotalValue]&lt;br /&gt;FROM [Products] AS [t0]&lt;br /&gt;LEFT OUTER JOIN [Categories] AS [t1] ON [t1].[CategoryID] = [t0].[CategoryID]&lt;br /&gt;WHERE EXISTS(&lt;br /&gt;    SELECT NULL AS [EMPTY]&lt;br /&gt;    FROM [OrderDetails] AS [t2]&lt;br /&gt;    INNER JOIN [Orders] AS [t3] ON [t3].[OrderID] = [t2].[OrderID]&lt;br /&gt;    WHERE ([t3].[ShipCountry] = @p0) AND ([t2].[ProductID] = [t0].[ProductID])&lt;br /&gt;    )&lt;br /&gt;ORDER BY [t0].[ProductName]&lt;/font&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;Now...that's cool :) (I know that you could do the same query with a better SQL...)&lt;/p&gt; &lt;p&gt;But you could probably say that you prefer to stay with your own DAL or even with the one that you bought. But &lt;u&gt;EVERYONE&lt;/u&gt; should learn about LINQ before starting a new project. There's no need to invent the wheel over and over. If you're going to develop in .NET (VB, C#, etc) you should consider LINQ, because it's a DAL, an O/R mapper, and it was tuned by a &lt;a href="http://blogs.msdn.com/ricom/default.aspx" target="_blank"&gt;real smart guy&lt;/a&gt; that works in a &lt;a href="http://www.microsoft.com" target="_blank"&gt;big company&lt;/a&gt;. Building your DAL with LINQ also adds the value of technical support and bug fixes with no cost. Keep in mind that LINQ can also be used to query local collections, XML, datasets or anything else that implements &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/03/13/new-orcas-language-feature-extension-methods.aspx" target="_blank"&gt;extension methods&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you want to learn how to use LINQ, there's no better way than trying. So, check &lt;a href="http://www.linqpad.net/" target="_blank"&gt;this&lt;/a&gt; out. (I must say that &lt;a href="http://www.linqpad.net" target="_blank"&gt;LINQPad&lt;/a&gt; rocks. Remember that you need to &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=333325fd-ae52-4e35-b531-508d977d32a6&amp;amp;DisplayLang=en" target="_blank"&gt;install .NET 3.5&lt;/a&gt; first)&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5b9dec33-8a14-4c9d-bf24-4393b3f02b96" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/LINQ" rel="tag"&gt;LINQ&lt;/a&gt;, &lt;a href="http://technorati.com/tags/LINQPad" rel="tag"&gt;LINQPad&lt;/a&gt;, &lt;a href="http://technorati.com/tags/.NET%203.5" rel="tag"&gt;.NET 3.5&lt;/a&gt;, &lt;a href="http://technorati.com/tags/DAL" rel="tag"&gt;DAL&lt;/a&gt;, &lt;a href="http://technorati.com/tags/O/R%20Mapper" rel="tag"&gt;O/R Mapper&lt;/a&gt;, &lt;a href="http://technorati.com/tags/ORM" rel="tag"&gt;ORM&lt;/a&gt;, &lt;a href="http://technorati.com/tags/SQL" rel="tag"&gt;SQL&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/3261.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/11/27/3261.aspx</guid>
            <pubDate>Tue, 27 Nov 2007 11:44:16 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/3261.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/11/27/3261.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/3261.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/3261.aspx</trackback:ping>
        </item>
        <item>
            <title>Generate C# code for BAM activities</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/19/2846.aspx</link>
            <description>&lt;p&gt;For those of you that are starting to learn BAM (like me) or are real guru guys, I've found a real nice app, named &lt;strong&gt;GenerateTypedBAMAPI&lt;/strong&gt;. You can find it at &lt;a href="http://www.codeplex.com/GenerateTypedBamApi" target="_blank"&gt;Codeplex&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The &lt;strong&gt;GenerateTypedBAMAPI&lt;/strong&gt; is a command-line tool that generates a typed C# API based on a BAM activity(ies) definition file.&lt;/p&gt; &lt;p&gt;Thanks &lt;a href="http://blogs.msdn.com/darrenj/" target="_blank"&gt;Darren&lt;/a&gt; :)&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:e8cefa6f-06ec-4d4a-9b3b-0579e83816fc" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/BAM" rel="tag"&gt;BAM&lt;/a&gt;, &lt;a href="http://technorati.com/tags/GenerateTypedBAMAPI" rel="tag"&gt;GenerateTypedBAMAPI&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/2846.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/19/2846.aspx</guid>
            <pubDate>Fri, 19 Oct 2007 08:06:19 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/2846.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/19/2846.aspx#feedback</comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/2846.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/2846.aspx</trackback:ping>
        </item>
        <item>
            <title>WoW!!! .NET Framework source code is going to be released!!!</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/03/2621.aspx</link>
            <description>&lt;p&gt;I'm amazed about &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/03/releasing-the-source-code-for-the-net-framework-libraries.aspx" target="_blank"&gt;this&lt;/a&gt;! No more &lt;a href="http://www.aisto.com/roeder/dotnet/" target="_blank"&gt;Reflector&lt;/a&gt; to peek under the hood.&lt;/p&gt; &lt;p&gt;No one can denied that Microsoft is putting a greater effort to accompany the open source wave. Two thumbs up MS!!!! :)&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:cb60f0af-92c1-4c21-b3d7-b67a258f6c34" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/.NET%20framework" rel="tag"&gt;.NET framework&lt;/a&gt;, &lt;a href="http://technorati.com/tags/source%20code" rel="tag"&gt;source code&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/2621.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/03/2621.aspx</guid>
            <pubDate>Wed, 03 Oct 2007 16:01:37 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/2621.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/10/03/2621.aspx#feedback</comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/2621.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/2621.aspx</trackback:ping>
        </item>
        <item>
            <title>How about using a WF inside BizTalk 2006...Now?</title>
            <link>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/06/05/781.aspx</link>
            <description>&lt;p&gt;Yeap...that's right!&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/pandrew/"&gt;Paul Andrew&lt;/a&gt; &lt;a href="http://blogs.msdn.com/pandrew/archive/2007/06/04/biztalk-adapter-for-windows-workflow-foundation-sample-june-2007-ctp.aspx"&gt;posted yesterday&lt;/a&gt; that's going to be released, later this month, a new SDK Sample that (and quoting) &lt;em&gt;"lets software developers build workflow models in Windows Workflow Foundation and then host then in BizTalk Server 2006"&lt;/em&gt;. The announcement was made in the TechEd that's happening right now back in Orlando, Florida.&lt;/p&gt; &lt;p&gt;I can't wait to have access and try this sample :-)&lt;/p&gt; &lt;p&gt;Go on and check his post...&lt;/p&gt; &lt;div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:38778a37-0237-4658-b656-ee538ed14183" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/wf" rel="tag"&gt;wf&lt;/a&gt;, &lt;a href="http://technorati.com/tags/biztalk%202006" rel="tag"&gt;biztalk 2006&lt;/a&gt;, &lt;a href="http://technorati.com/tags/teched%2007" rel="tag"&gt;teched 07&lt;/a&gt;&lt;/div&gt;&lt;img src="http://agilior.pt/blogs/rodrigo.guerreiro/aggbug/781.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Rodrigo Guerreiro</dc:creator>
            <guid>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/06/05/781.aspx</guid>
            <pubDate>Tue, 05 Jun 2007 18:00:48 GMT</pubDate>
            <wfw:comment>http://agilior.pt/blogs/rodrigo.guerreiro/comments/781.aspx</wfw:comment>
            <comments>http://agilior.pt/blogs/rodrigo.guerreiro/archive/2007/06/05/781.aspx#feedback</comments>
            <wfw:commentRss>http://agilior.pt/blogs/rodrigo.guerreiro/comments/commentRss/781.aspx</wfw:commentRss>
            <trackback:ping>http://agilior.pt/blogs/rodrigo.guerreiro/services/trackbacks/781.aspx</trackback:ping>
        </item>
    </channel>
</rss>