<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Dan Miser - .NET</title>
    <link>http://www.distribucon.com/blog/</link>
    <description>Thoughts from Dan Miser</description>
    <language>en-us</language>
    <copyright>Dan Miser</copyright>
    <lastBuildDate>Sat, 10 Mar 2012 01:48:03 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>dmiser@distribucon.com</managingEditor>
    <webMaster>dmiser@distribucon.com</webMaster>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=95b804aa-2db8-49ce-bf3c-958607e6daea</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,95b804aa-2db8-49ce-bf3c-958607e6daea.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,95b804aa-2db8-49ce-bf3c-958607e6daea.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=95b804aa-2db8-49ce-bf3c-958607e6daea</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">There is no way I can list everything I
learned with <a href="http://xamarin.com/monotouch">MonoTouch</a> over the last couple
of months. I'll summarize my experience by saying I'm a very happy customer. There
were bumps and bruises along the way, but between the mailing list and the support
crew at Xamarin, I heartily recommend investigating MonoTouch if you're a .NET developer
that wants to get to the iOS AppStore quickly. I had to take several detours along
the way (converted my existing app from Lightspeed to EF4 CodeFirst, converted to
use POCOs, had support obligations, and wrote a sync engine to communicate over <a href="http://www.servicestack.net">ServiceStack</a>,
but in the end, things lined up pretty well. 
<p />
Some of the highlights: 
<ul><li>
I had to write code to essentially mimic the context loading that EF would do for
you. This included fixing up object references as well as reading and writing from
the SQLite database. Not horribly difficult, but it was something I'd rather I didn't
have to do. 
</li><li>
I encountered a couple of problems executing various LINQ statements when running
on the device. A quick test case, and the devs at Xamarin had me with either workarounds
or fresh bits to solve my problems. 
</li><li>
Be sure to embrace threading when making web calls - especially on startup. You have
15 seconds to have your app launched on the device, or the device will think it is
hung and kill the app. 
</li><li>
Deploying to the app store has been written about extensively as a complex and intricate
process. It turns out, there's good reason for that. After I got through an error
due to linking my release build to ServiceStack.Text.dll, the resulting upload to
the app store was failing verification. For some reason, the application name of RouteBoostiPhone.app
was not being accepted. I changed the name to RouteBoost.app and it sailed right through.
I have no idea exactly why this was required, but there you have it. 
</li><li>
MonoTouch.Dialog is a very nice framework for building a line of business app. Be
sure to check it out. 
</li></ul><p />
When I look back on the road I travelled to get my app to the app store, I'm impressed
with how much of the business logic I was able to carry over. The time savings in
being able to bring my business logic across as POCOs that have been extensively tested
in production over many years was the real reason I went with MonoTouch to begin with.
I most definitely do not regret that decision. 
<p />
Note: I was not compensated or asked to write this post. I am just a happy paying
customer of a product that saved me time, and I wanted to share my experience.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=95b804aa-2db8-49ce-bf3c-958607e6daea" /></body>
      <title>MonoTouch</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,95b804aa-2db8-49ce-bf3c-958607e6daea.aspx</guid>
      <link>http://www.distribucon.com/blog/MonoTouch.aspx</link>
      <pubDate>Sat, 10 Mar 2012 01:48:03 GMT</pubDate>
      <description>There is no way I can list everything I learned with &lt;a href="http://xamarin.com/monotouch"&gt;MonoTouch&lt;/a&gt; over
the last couple of months. I'll summarize my experience by saying I'm a very happy
customer. There were bumps and bruises along the way, but between the mailing list
and the support crew at Xamarin, I heartily recommend investigating MonoTouch if you're
a .NET developer that wants to get to the iOS AppStore quickly. I had to take several
detours along the way (converted my existing app from Lightspeed to EF4 CodeFirst,
converted to use POCOs, had support obligations, and wrote a sync engine to communicate
over &lt;a href="http://www.servicestack.net"&gt;ServiceStack&lt;/a&gt;, but in the end, things
lined up pretty well. 
&lt;p /&gt;
Some of the highlights: 
&lt;ul&gt;
&lt;li&gt;
I had to write code to essentially mimic the context loading that EF would do for
you. This included fixing up object references as well as reading and writing from
the SQLite database. Not horribly difficult, but it was something I'd rather I didn't
have to do. 
&lt;li&gt;
I encountered a couple of problems executing various LINQ statements when running
on the device. A quick test case, and the devs at Xamarin had me with either workarounds
or fresh bits to solve my problems. 
&lt;li&gt;
Be sure to embrace threading when making web calls - especially on startup. You have
15 seconds to have your app launched on the device, or the device will think it is
hung and kill the app. 
&lt;li&gt;
Deploying to the app store has been written about extensively as a complex and intricate
process. It turns out, there's good reason for that. After I got through an error
due to linking my release build to ServiceStack.Text.dll, the resulting upload to
the app store was failing verification. For some reason, the application name of RouteBoostiPhone.app
was not being accepted. I changed the name to RouteBoost.app and it sailed right through.
I have no idea exactly why this was required, but there you have it. 
&lt;li&gt;
MonoTouch.Dialog is a very nice framework for building a line of business app. Be
sure to check it out. 
&lt;/ul&gt;
&lt;p /&gt;
When I look back on the road I travelled to get my app to the app store, I'm impressed
with how much of the business logic I was able to carry over. The time savings in
being able to bring my business logic across as POCOs that have been extensively tested
in production over many years was the real reason I went with MonoTouch to begin with.
I most definitely do not regret that decision. 
&lt;p /&gt;
Note: I was not compensated or asked to write this post. I am just a happy paying
customer of a product that saved me time, and I wanted to share my experience.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=95b804aa-2db8-49ce-bf3c-958607e6daea" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,95b804aa-2db8-49ce-bf3c-958607e6daea.aspx</comments>
      <category>.NET</category>
      <category>iPhone</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=06edb1e9-68c8-44cf-81ae-2e2ba020225e</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,06edb1e9-68c8-44cf-81ae-2e2ba020225e.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,06edb1e9-68c8-44cf-81ae-2e2ba020225e.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=06edb1e9-68c8-44cf-81ae-2e2ba020225e</wfw:commentRss>
      <slash:comments>8</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I had a class that looked like this:<br /><pre><code> public class CollectionDetail { public int Id { get; set; } ... public
MachineField MachineField { get; set; } } </code></pre><p>
I would then later write LINQ code that would end up retrieving these objects. The
problem was MachineField was always set to null. I banged my head on this for a long
time looking at everything I could think of. Finally, after looking at the CollectionDetail
class one more time, I noticed that other Foreign Key objects were marked with virtual,
and I remembered that I removed virtual while I was trying to test whether or not
the object's lazy load behavior. All of the documentation clearly states that you
need to mark this virtual. Once I added the virtual keyword back, everything worked
exactly as it should have.
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=06edb1e9-68c8-44cf-81ae-2e2ba020225e" /></body>
      <title>Entity Framework CodeFirst: virtual is sort of important</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,06edb1e9-68c8-44cf-81ae-2e2ba020225e.aspx</guid>
      <link>http://www.distribucon.com/blog/EntityFrameworkCodeFirstVirtualIsSortOfImportant.aspx</link>
      <pubDate>Wed, 15 Feb 2012 00:55:59 GMT</pubDate>
      <description>I had a class that looked like this:&lt;br&gt;
&lt;pre&gt;&lt;code&gt; public class CollectionDetail { public int Id { get; set; } ... public
MachineField MachineField { get; set; } } &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I would then later write LINQ code that would end up retrieving these objects. The
problem was MachineField was always set to null. I banged my head on this for a long
time looking at everything I could think of. Finally, after looking at the CollectionDetail
class one more time, I noticed that other Foreign Key objects were marked with virtual,
and I remembered that I removed virtual while I was trying to test whether or not
the object's lazy load behavior. All of the documentation clearly states that you
need to mark this virtual. Once I added the virtual keyword back, everything worked
exactly as it should have.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=06edb1e9-68c8-44cf-81ae-2e2ba020225e" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,06edb1e9-68c8-44cf-81ae-2e2ba020225e.aspx</comments>
      <category>.NET</category>
      <category>EntityFramework</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=efa8fa30-6915-48d9-a02c-90a73404c211</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,efa8fa30-6915-48d9-a02c-90a73404c211.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,efa8fa30-6915-48d9-a02c-90a73404c211.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=efa8fa30-6915-48d9-a02c-90a73404c211</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I found the class ActionSheetDatePicker
from the book <a href="http://www.apress.com/9781430231745">Developing C# Apps for
iPhone and iPad using MonoTouch iOS Apps Development for .NET Developers</a>. It was
a very nice and clean implementation that would allow for having an ActionSheet pop
up with a UIDatePicker in an iOS application. 
<p />
It did lack 2 things, though:<br /><ol><li>
The ability to specify a starting default date in the UIDatePicker 
</li><li>
The ability to get cleanly launched from a UITextField component (i.e. effectively
replace the default keyboard of a text field with this date picker). The original
code would leave the default keyboard up when getting called from a UITextField component. 
</li></ol><p />
I fixed those things, and you can find the results in <a href="https://gist.github.com/gists/1657921">this
gist</a>.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=efa8fa30-6915-48d9-a02c-90a73404c211" /></body>
      <title>ActionSheetDatePicker enhancements</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,efa8fa30-6915-48d9-a02c-90a73404c211.aspx</guid>
      <link>http://www.distribucon.com/blog/ActionSheetDatePickerEnhancements.aspx</link>
      <pubDate>Sun, 22 Jan 2012 18:13:42 GMT</pubDate>
      <description>I found the class ActionSheetDatePicker from the book &lt;a href="http://www.apress.com/9781430231745"&gt;Developing
C# Apps for iPhone and iPad using MonoTouch iOS Apps Development for .NET Developers&lt;/a&gt;.
It was a very nice and clean implementation that would allow for having an ActionSheet
pop up with a UIDatePicker in an iOS application. 
&lt;p /&gt;
It did lack 2 things, though:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;
The ability to specify a starting default date in the UIDatePicker 
&lt;li&gt;
The ability to get cleanly launched from a UITextField component (i.e. effectively
replace the default keyboard of a text field with this date picker). The original
code would leave the default keyboard up when getting called from a UITextField component. 
&lt;/ol&gt;
&lt;p /&gt;
I fixed those things, and you can find the results in &lt;a href="https://gist.github.com/gists/1657921"&gt;this
gist&lt;/a&gt;.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=efa8fa30-6915-48d9-a02c-90a73404c211" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,efa8fa30-6915-48d9-a02c-90a73404c211.aspx</comments>
      <category>.NET</category>
      <category>iPhone</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=0d7f843b-6348-42cb-978b-23a5857600ca</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,0d7f843b-6348-42cb-978b-23a5857600ca.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,0d7f843b-6348-42cb-978b-23a5857600ca.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0d7f843b-6348-42cb-978b-23a5857600ca</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">My company's core applications are written
in ASP.NET MVC, and <a href="http://www.routexcel.com/press/RoutExcelReplayMay2011.pdf" target="_blank">have
been well received</a>. But the nature of what those applications can do in limited/non-existent
connectivity areas is causing enough problems that I need a native iPhone solution.
(HTML 5 offline storage is not enough. I need full access to the brains of calculation
engines that are in my business logic on the server, and I wouldn't relish moving
that logic to JavaScript. Besides, I found a real nice thermal receipt printer that
will work via SDK with a native app!) 
<p />
I came across <a href="http://xamarin.com/monotouch" target="_blank">MonoTouch</a>,
and I really like how it will enable reuse of my hard work over the years. The main
obstacle for me was how to get the data out to my iPhone client. I wasn't exactly
thrilled with the idea of shoe-horning WCF access from the iPhone, and working with
WCF at my day job is a configuration nightmare. REST would be good, but I wasn't happy
with the options out there - until I found <a href="http://www.servicestack.net/" target="_blank">ServiceStack</a>.
I don't know why this thing doesn't get more publicity. It is everything I want: small,
fast, actively developed, easy to configure, JSON, REST, DTOs, and works easily with
MonoTouch. Well done, guys. 
<p />
The first snag I hit getting some demo code out there was that if you want to have
the client code exist on MonoTouch, be sure to add references to the assemblies found <a href="https://github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoTouch">in
the MonoTouch-v2.20.zip file on github</a>. I'm curious why this is still labelled
as 2.20, and why those assemblies are still dated from June 9, 2011, but for now,
things are moving along to convert my ASP.NET MVC application to use services, and
expose those services for use on my iPhone client. 
<p />
Look for more posts about ServiceStack and MonoTouch in the near future.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0d7f843b-6348-42cb-978b-23a5857600ca" /></body>
      <title>ServiceStack and MonoTouch</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,0d7f843b-6348-42cb-978b-23a5857600ca.aspx</guid>
      <link>http://www.distribucon.com/blog/ServiceStackAndMonoTouch.aspx</link>
      <pubDate>Thu, 08 Dec 2011 21:27:12 GMT</pubDate>
      <description>My company's core applications are written in ASP.NET MVC, and &lt;a href="http://www.routexcel.com/press/RoutExcelReplayMay2011.pdf" target="_blank"&gt;have
been well received&lt;/a&gt;. But the nature of what those applications can do in limited/non-existent
connectivity areas is causing enough problems that I need a native iPhone solution.
(HTML 5 offline storage is not enough. I need full access to the brains of calculation
engines that are in my business logic on the server, and I wouldn't relish moving
that logic to JavaScript. Besides, I found a real nice thermal receipt printer that
will work via SDK with a native app!) 
&lt;p /&gt;
I came across &lt;a href="http://xamarin.com/monotouch" target="_blank"&gt;MonoTouch&lt;/a&gt;,
and I really like how it will enable reuse of my hard work over the years. The main
obstacle for me was how to get the data out to my iPhone client. I wasn't exactly
thrilled with the idea of shoe-horning WCF access from the iPhone, and working with
WCF at my day job is a configuration nightmare. REST would be good, but I wasn't happy
with the options out there - until I found &lt;a href="http://www.servicestack.net/" target="_blank"&gt;ServiceStack&lt;/a&gt;.
I don't know why this thing doesn't get more publicity. It is everything I want: small,
fast, actively developed, easy to configure, JSON, REST, DTOs, and works easily with
MonoTouch. Well done, guys. 
&lt;p /&gt;
The first snag I hit getting some demo code out there was that if you want to have
the client code exist on MonoTouch, be sure to add references to the assemblies found &lt;a href="https://github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoTouch"&gt;in
the MonoTouch-v2.20.zip file on github&lt;/a&gt;. I'm curious why this is still labelled
as 2.20, and why those assemblies are still dated from June 9, 2011, but for now,
things are moving along to convert my ASP.NET MVC application to use services, and
expose those services for use on my iPhone client. 
&lt;p /&gt;
Look for more posts about ServiceStack and MonoTouch in the near future.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0d7f843b-6348-42cb-978b-23a5857600ca" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,0d7f843b-6348-42cb-978b-23a5857600ca.aspx</comments>
      <category>.NET</category>
      <category>iPhone</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=7d56fa21-a0c2-49d9-aaa6-f801f572c403</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,7d56fa21-a0c2-49d9-aaa6-f801f572c403.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,7d56fa21-a0c2-49d9-aaa6-f801f572c403.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7d56fa21-a0c2-49d9-aaa6-f801f572c403</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I've had a web application written <a href="http://www.distribucon.com/blog/ASPNETMVCOnTheIPhone.aspx">using
iUI</a> for a couple of years now. It's been stable and rock solid, and I really appreciate
the leg up that it gave me. However, this weekend I converted away from iUI to <a href="http://www.jquerymobile.com">jQueryMobile</a>.
I have another application in production already using jQueryMobile, and it is absolutely
an amazing library.<br /><br />
The reasons I went with this move were:<br /><ul><li>
iOS 5 had substantial changes to Safari and my existing application is broken in many
places. Instead of spending time debugging and fixing something 2 years old, I figured
I'd take the time to port to jQueryMobile.<br /></li><li>
I've had to leave iUI at version 0.31 for this entire 2 year period. When they started
development on the 0.4 version, they changed form submissions to break if you had
multiple form fields with the same name. I absolutely had to have this capability
in order to support <a href="http://www.distribucon.com/blog/ASPNETMVCOnTheIPhone.aspx">ASP.NET
MVC list binding</a>. I reported the issue in the forums, and it didn't get much attention.
Sure, it's open source, but if I have to chase down bug fixing in a framework I'm
not intimately familiar with, it's a negative.<br /></li><li>
There is no easy way with the released version of iUI to do things like jQuery calls,
hook events into the page create/show and hide/destroy. Sure, there are code modifications
you can find on the web, but it's a forking nightmare and tough to maintain (is this
for 0.31, 0.4, or 0.5? does it require other extensions or modifications? etc.).<br /></li><li>
From a non-technical perspective, the roadmap of iUI has been all over the place.
I can't remember for sure, but I think it was originally slated for moving 0.4 in
to release status in like June of 2009. It's been pushed out over and over again,
trimmed in scope, and there just doesn't seem to be traction or consensus to move
the product forward. In contrast, jQueryMobile is looking to have a 1.0 release in
the next few weeks with constant releases over the past few months.<br /></li></ul><p></p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=7d56fa21-a0c2-49d9-aaa6-f801f572c403" /></body>
      <title>Replacing iUI with JQueryMobile</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,7d56fa21-a0c2-49d9-aaa6-f801f572c403.aspx</guid>
      <link>http://www.distribucon.com/blog/ReplacingIUIWithJQueryMobile.aspx</link>
      <pubDate>Sat, 15 Oct 2011 21:26:06 GMT</pubDate>
      <description>I've had a web application written &lt;a href="http://www.distribucon.com/blog/ASPNETMVCOnTheIPhone.aspx"&gt;using
iUI&lt;/a&gt; for a couple of years now. It's been stable and rock solid, and I really appreciate
the leg up that it gave me. However, this weekend I converted away from iUI to &lt;a href="http://www.jquerymobile.com"&gt;jQueryMobile&lt;/a&gt;.
I have another application in production already using jQueryMobile, and it is absolutely
an amazing library.&lt;br&gt;
&lt;br&gt;
The reasons I went with this move were:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;
iOS 5 had substantial changes to Safari and my existing application is broken in many
places. Instead of spending time debugging and fixing something 2 years old, I figured
I'd take the time to port to jQueryMobile.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
I've had to leave iUI at version 0.31 for this entire 2 year period. When they started
development on the 0.4 version, they changed form submissions to break if you had
multiple form fields with the same name. I absolutely had to have this capability
in order to support &lt;a href="http://www.distribucon.com/blog/ASPNETMVCOnTheIPhone.aspx"&gt;ASP.NET
MVC list binding&lt;/a&gt;. I reported the issue in the forums, and it didn't get much attention.
Sure, it's open source, but if I have to chase down bug fixing in a framework I'm
not intimately familiar with, it's a negative.&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
There is no easy way with the released version of iUI to do things like jQuery calls,
hook events into the page create/show and hide/destroy. Sure, there are code modifications
you can find on the web, but it's a forking nightmare and tough to maintain (is this
for 0.31, 0.4, or 0.5? does it require other extensions or modifications? etc.).&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;
From a non-technical perspective, the roadmap of iUI has been all over the place.
I can't remember for sure, but I think it was originally slated for moving 0.4 in
to release status in like June of 2009. It's been pushed out over and over again,
trimmed in scope, and there just doesn't seem to be traction or consensus to move
the product forward. In contrast, jQueryMobile is looking to have a 1.0 release in
the next few weeks with constant releases over the past few months.&lt;br&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=7d56fa21-a0c2-49d9-aaa6-f801f572c403" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,7d56fa21-a0c2-49d9-aaa6-f801f572c403.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
      <category>iPhone</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=8d4734c0-2256-4316-91c3-ee0d7c6cbd91</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,8d4734c0-2256-4316-91c3-ee0d7c6cbd91.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,8d4734c0-2256-4316-91c3-ee0d7c6cbd91.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8d4734c0-2256-4316-91c3-ee0d7c6cbd91</wfw:commentRss>
      <slash:comments>9</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">At work here, we use generated files with
partial classes to get us through the tedium of creating mundane classes. It works
well enough, but one of my biggest complaints about this is that if you then need
to do a Find in Files, you get hundreds, or maybe thousands, of extra hits when searching
for something that would be found inside those generated files. 
<p />
Today I came across the free tool <a href="http://blog.arainia.com/2010/08/ultra-find-getting-started.html" target="_blank">Ultra
Find</a> in the Extensions gallery. It does exactly what I want, namely, lets me focus
on the search results that aren't in the generated files. 
<p />
Thanks, Logan. Very useful!<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8d4734c0-2256-4316-91c3-ee0d7c6cbd91" /></body>
      <title>How to Exclude Files from VS2010 Find in Files</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,8d4734c0-2256-4316-91c3-ee0d7c6cbd91.aspx</guid>
      <link>http://www.distribucon.com/blog/HowToExcludeFilesFromVS2010FindInFiles.aspx</link>
      <pubDate>Thu, 29 Sep 2011 18:30:45 GMT</pubDate>
      <description>At work here, we use generated files with partial classes to get us through the tedium of creating mundane classes. It works well enough, but one of my biggest complaints about this is that if you then need to do a Find in Files, you get hundreds, or maybe thousands, of extra hits when searching for something that would be found inside those generated files.
&lt;p /&gt;
Today I came across the free tool &lt;a href="http://blog.arainia.com/2010/08/ultra-find-getting-started.html" target="_blank"&gt;Ultra
Find&lt;/a&gt; in the Extensions gallery. It does exactly what I want, namely, lets me focus
on the search results that aren't in the generated files. 
&lt;p /&gt;
Thanks, Logan. Very useful!&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8d4734c0-2256-4316-91c3-ee0d7c6cbd91" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,8d4734c0-2256-4316-91c3-ee0d7c6cbd91.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=ca79a99e-c698-4e0c-9449-f9d79fdff1f0</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,ca79a99e-c698-4e0c-9449-f9d79fdff1f0.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,ca79a99e-c698-4e0c-9449-f9d79fdff1f0.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ca79a99e-c698-4e0c-9449-f9d79fdff1f0</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">While creating a view model for an MVC
3 application, I annotated a property with the DataType.EmailAddress attribute. My
thinking was that it would validate whether or not the contents of the property was
in a valid email format. The attribute does not perform validation, however. This <a href="http://stackoverflow.com/questions/2391423/is-the-datatypeattribute-validation-working-in-mvc2">StackOverflow</a> article
discusses some ways to add that functionality.<br /><p></p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=ca79a99e-c698-4e0c-9449-f9d79fdff1f0" /></body>
      <title>DataType.EmailAddress doesn't validate</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,ca79a99e-c698-4e0c-9449-f9d79fdff1f0.aspx</guid>
      <link>http://www.distribucon.com/blog/DataTypeEmailAddressDoesntValidate.aspx</link>
      <pubDate>Thu, 01 Sep 2011 02:31:51 GMT</pubDate>
      <description>While creating a view model for an MVC 3 application, I annotated a property with the DataType.EmailAddress attribute. My thinking was that it would validate whether or not the contents of the property was in a valid email format. The attribute does not perform validation, however. This &lt;a href="http://stackoverflow.com/questions/2391423/is-the-datatypeattribute-validation-working-in-mvc2"&gt;StackOverflow&lt;/a&gt; article
discusses some ways to add that functionality.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=ca79a99e-c698-4e0c-9449-f9d79fdff1f0" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,ca79a99e-c698-4e0c-9449-f9d79fdff1f0.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=6a281769-e8de-4a5f-af31-198812806c51</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,6a281769-e8de-4a5f-af31-198812806c51.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,6a281769-e8de-4a5f-af31-198812806c51.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6a281769-e8de-4a5f-af31-198812806c51</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">The conversion is finally on. I've had
a lot of praise for <a href="http://www.mindscapehq.com/products/lightspeed">LightSpeed</a> over
the years. The guys writing it are wicked smart, and Ivan is a rockstar on the support
forums. They've solved a lot of bugs for me while I've been a customer, but the time
has come to move on.<br /><br />
I've become quite proficient with LINQ, and use it all over the place in my code.
Having to drop down and execute loops and run suboptimal queries because I have to
execute an intermediate ToList() just to get around projection and grouping errors
has taken its toll on me.<br /><br />
I truly wish the guys at Mindscape continued success, but the time has come to move
on to the company that provides a MSSQL LINQ provider that is completely fleshed out.<br /><p></p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=6a281769-e8de-4a5f-af31-198812806c51" /></body>
      <title>Moving from LightSpeed to Entity Framework</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,6a281769-e8de-4a5f-af31-198812806c51.aspx</guid>
      <link>http://www.distribucon.com/blog/MovingFromLightSpeedToEntityFramework.aspx</link>
      <pubDate>Fri, 22 Jul 2011 00:39:06 GMT</pubDate>
      <description>The conversion is finally on. I've had a lot of praise for &lt;a href="http://www.mindscapehq.com/products/lightspeed"&gt;LightSpeed&lt;/a&gt; over
the years. The guys writing it are wicked smart, and Ivan is a rockstar on the support
forums. They've solved a lot of bugs for me while I've been a customer, but the time
has come to move on.&lt;br&gt;
&lt;br&gt;
I've become quite proficient with LINQ, and use it all over the place in my code.
Having to drop down and execute loops and run suboptimal queries because I have to
execute an intermediate ToList() just to get around projection and grouping errors
has taken its toll on me.&lt;br&gt;
&lt;br&gt;
I truly wish the guys at Mindscape continued success, but the time has come to move
on to the company that provides a MSSQL LINQ provider that is completely fleshed out.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=6a281769-e8de-4a5f-af31-198812806c51" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,6a281769-e8de-4a5f-af31-198812806c51.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=56424993-6c09-408c-a425-b5f4fefb0db8</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,56424993-6c09-408c-a425-b5f4fefb0db8.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,56424993-6c09-408c-a425-b5f4fefb0db8.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=56424993-6c09-408c-a425-b5f4fefb0db8</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been ussing <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">CC.NET</a> for
probably the last 5 years with good success. At work, we recently migrated to TFS
2010 (installation and configuration are brutal, but it's sort of nice when it all
works). I figured I'd take this time to look around and see what I've been missing
on the continuous integration scene for my personal projects. The 2 leading contenders
were <a href="http://www.jetbrains.com/teamcity">TeamCity</a> and <a href="http://www.atlassian.com/software/bamboo/">Bamboo</a>.
I went with TeamCity since I use ReSharper, and think the JetBrains guys are pretty
top-notch.<br /><br />
Installation was drop-dead simple. Configuring was pretty straight-forward, but I
had an assist from <a href="http://stackoverflow.com/questions/361386/thorough-tutorial-on-setting-up-jetbrains-teamcity-ci-server">StackOverflow</a>,
which led me to this amazing article/series by <a href="http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_25.html">Troy
Hunt</a>. After following Troy's instructions, and slightly adjusting for the obvious
version differences, I had things up and running, with a completed build inside 15
minutes.<br /><br />
I also configured the Build Triggering step because I want the build to fire off each
time I checkin. I've got a few things to take care of (notifications of broken builds,
code coverage, etc.), but it looks like this is a much easier application to configure
than CC.NET.<br /><p></p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=56424993-6c09-408c-a425-b5f4fefb0db8" /></body>
      <title>TeamCity for Continuous Integration of .NET projects</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,56424993-6c09-408c-a425-b5f4fefb0db8.aspx</guid>
      <link>http://www.distribucon.com/blog/TeamCityForContinuousIntegrationOfNETProjects.aspx</link>
      <pubDate>Sun, 17 Jul 2011 01:36:26 GMT</pubDate>
      <description>I've been ussing &lt;a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET"&gt;CC.NET&lt;/a&gt; for
probably the last 5 years with good success. At work, we recently migrated to TFS
2010 (installation and configuration are brutal, but it's sort of nice when it all
works). I figured I'd take this time to look around and see what I've been missing
on the continuous integration scene for my personal projects. The 2 leading contenders
were &lt;a href="http://www.jetbrains.com/teamcity"&gt;TeamCity&lt;/a&gt; and &lt;a href="http://www.atlassian.com/software/bamboo/"&gt;Bamboo&lt;/a&gt;.
I went with TeamCity since I use ReSharper, and think the JetBrains guys are pretty
top-notch.&lt;br&gt;
&lt;br&gt;
Installation was drop-dead simple. Configuring was pretty straight-forward, but I
had an assist from &lt;a href="http://stackoverflow.com/questions/361386/thorough-tutorial-on-setting-up-jetbrains-teamcity-ci-server"&gt;StackOverflow&lt;/a&gt;,
which led me to this amazing article/series by &lt;a href="http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity_25.html"&gt;Troy
Hunt&lt;/a&gt;. After following Troy's instructions, and slightly adjusting for the obvious
version differences, I had things up and running, with a completed build inside 15
minutes.&lt;br&gt;
&lt;br&gt;
I also configured the Build Triggering step because I want the build to fire off each
time I checkin. I've got a few things to take care of (notifications of broken builds,
code coverage, etc.), but it looks like this is a much easier application to configure
than CC.NET.&lt;br&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=56424993-6c09-408c-a425-b5f4fefb0db8" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,56424993-6c09-408c-a425-b5f4fefb0db8.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=9e18df07-6e96-4a00-93a7-5e14727fe0ea</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,9e18df07-6e96-4a00-93a7-5e14727fe0ea.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,9e18df07-6e96-4a00-93a7-5e14727fe0ea.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=9e18df07-6e96-4a00-93a7-5e14727fe0ea</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">The Web Platform Installer (WPI) is really
nice when it works. But when it doesn't, it's a battle to the death to get things
to work. Case in point: I was trying to install php on my Windows 2008 Server through
WPI, but it would go on forever during the FastCGI install step. I looked at logs
and the Event Viewer, and searched google. A lot of people reported a similar problem,
but there was no definitive recipe to get past the problem. 
<p />
In the end, I just clicked on the link for FastCGI in the installation details window
of WPI, and installed that piece manually. It went through without a hitch. After
a restart (which the FastCGI installer required), I installed php from WPI, and it
installed the 4 remaining pieces without a hitch, and it did so quickly. So just a
note that if WPI starts acting up, just install the problematic piece manually and
then let WPI continue.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=9e18df07-6e96-4a00-93a7-5e14727fe0ea" /></body>
      <title>FastCGI install hangs when called from Web Platform Installer</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,9e18df07-6e96-4a00-93a7-5e14727fe0ea.aspx</guid>
      <link>http://www.distribucon.com/blog/FastCGIInstallHangsWhenCalledFromWebPlatformInstaller.aspx</link>
      <pubDate>Tue, 22 Feb 2011 04:04:52 GMT</pubDate>
      <description>The Web Platform Installer (WPI) is really nice when it works. But when it doesn't, it's a battle to the death to get things to work. Case in point: I was trying to install php on my Windows 2008 Server through WPI, but it would go on forever during the FastCGI install step. I looked at logs and the Event Viewer, and searched google. A lot of people reported a similar problem, but there was no definitive recipe to get past the problem.
&lt;p /&gt;
In the end, I just clicked on the link for FastCGI in the installation details window
of WPI, and installed that piece manually. It went through without a hitch. After
a restart (which the FastCGI installer required), I installed php from WPI, and it
installed the 4 remaining pieces without a hitch, and it did so quickly. So just a
note that if WPI starts acting up, just install the problematic piece manually and
then let WPI continue.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=9e18df07-6e96-4a00-93a7-5e14727fe0ea" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,9e18df07-6e96-4a00-93a7-5e14727fe0ea.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=fb877012-4626-4e22-a97b-93dda05e70f7</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,fb877012-4626-4e22-a97b-93dda05e70f7.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,fb877012-4626-4e22-a97b-93dda05e70f7.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fb877012-4626-4e22-a97b-93dda05e70f7</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
First things first: .NET Reflector is, and always has been, an amazing piece of technology.
Any .NET developer that has worked for any length of time has benefited from the original
vision of Lutz Roeder. Secondly, I don't blame him in the least bit for selling to
RedGate to profit on his effort and talent. He more than earned it.
</p>
        <p>
But let me get this straight: According to the <a href="http://bit.ly/g0GdpN" target="_blank">CEO
of RedGate</a>, they made a mistake buying it. There's no other way to put it. They
hoped it would lead to increased sales of their overpriced tools, and it didn't. They
hoped that it would lead users to purchase premium versions of Reflector, and it didn't.
Gee, I'm sure no one could have possibly predicted that! (Yes, that was sarcasm).
Only someone completely out of touch with developers would think "I know! I'll make
inroads to the development community by just buying out a product that used to be
free, and start charging for it". Let me know how that works out for you. You bought
Reflector as a loss-leader and to buy your way in to the community. Live with the
consequences of your incompetent decision.
</p>
        <p>
The issue is not the $35. I've spent more for worse tools. But when I've done that,
it's almost always been to support the effort of a one-man shop working his butt off.
It is <i>not</i> going to happen in order to have some corporate entity try to recoup
losses on a bad business decision. They knew all along that Reflector didn't align
with the tools that they sell.
</p>
        <p>
Taking away the free version simply shows that RedGate management is clueless. As
for me, I'll put $100 towards the next free/open reflector to come along instead of
rewarding RedGate with a sale.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=fb877012-4626-4e22-a97b-93dda05e70f7" />
      </body>
      <title>Thoughts on RedGate and .NET Reflector</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,fb877012-4626-4e22-a97b-93dda05e70f7.aspx</guid>
      <link>http://www.distribucon.com/blog/ThoughtsOnRedGateAndNETReflector.aspx</link>
      <pubDate>Wed, 02 Feb 2011 23:09:12 GMT</pubDate>
      <description>&lt;p&gt;
First things first: .NET Reflector is, and always has been, an amazing piece of technology.
Any .NET developer that has worked for any length of time has benefited from the original
vision of Lutz Roeder. Secondly, I don't blame him in the least bit for selling to
RedGate to profit on his effort and talent. He more than earned it.
&lt;/p&gt;
&lt;p&gt;
But let me get this straight: According to the &lt;a href="http://bit.ly/g0GdpN" target="_blank"&gt;CEO
of RedGate&lt;/a&gt;, they made a mistake buying it. There's no other way to put it. They
hoped it would lead to increased sales of their overpriced tools, and it didn't. They
hoped that it would lead users to purchase premium versions of Reflector, and it didn't.
Gee, I'm sure no one could have possibly predicted that! (Yes, that was sarcasm).
Only someone completely out of touch with developers would think "I know! I'll make
inroads to the development community by just buying out a product that used to be
free, and start charging for it". Let me know how that works out for you. You bought
Reflector as a loss-leader and to buy your way in to the community. Live with the
consequences of your incompetent decision.
&lt;/p&gt;
&lt;p&gt;
The issue is not the $35. I've spent more for worse tools. But when I've done that,
it's almost always been to support the effort of a one-man shop working his butt off.
It is &lt;i&gt;not&lt;/i&gt; going to happen in order to have some corporate entity try to recoup
losses on a bad business decision. They knew all along that Reflector didn't align
with the tools that they sell.
&lt;/p&gt;
&lt;p&gt;
Taking away the free version simply shows that RedGate management is clueless. As
for me, I'll put $100 towards the next free/open reflector to come along instead of
rewarding RedGate with a sale.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=fb877012-4626-4e22-a97b-93dda05e70f7" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,fb877012-4626-4e22-a97b-93dda05e70f7.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=e9083bab-855a-4e49-9732-f0fa210c31e9</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,e9083bab-855a-4e49-9732-f0fa210c31e9.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,e9083bab-855a-4e49-9732-f0fa210c31e9.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e9083bab-855a-4e49-9732-f0fa210c31e9</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Rather than another "me too" post on the
release of ASP.NET MVC 3, which Hanselman, Haack, and Guthrie have covered in-depth,
I thought I'd post the good news that a couple of bugs that have bothered me are fixed
in this version. 
<p /><ol><li>
There was a problem when using <a href="http://www.hanselman.com/blog/ABetterASPNETMVCMobileDeviceCapabilitiesViewEngine.aspx" target="_new">auto-detecting
view engines</a> when compiling under release mode. Basically, if you hit the site
with your desktop browser first, and then come in with the mobile phone, you would
still be presented the desktop version. This is now fixed. 
</li><li>
I posted about <a href="http://www.distribucon.com/blog/ASPNETMVC3RC2BindingErrors.aspx" target="_new">a
problem with binding with the RC2 release</a>. This also appears to be fixed. 
</li></ol>
Throw in the <a href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/" target="_new">new
scaffolding support</a>, and 2011 is shaping up to be a great year for MVC.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e9083bab-855a-4e49-9732-f0fa210c31e9" /></body>
      <title>ASP.NET MVC 3 RTM bug fixes</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,e9083bab-855a-4e49-9732-f0fa210c31e9.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVC3RTMBugFixes.aspx</link>
      <pubDate>Sat, 15 Jan 2011 07:25:35 GMT</pubDate>
      <description>Rather than another "me too" post on the release of ASP.NET MVC 3, which Hanselman, Haack, and Guthrie have covered in-depth, I thought I'd post the good news that a couple of bugs that have bothered me are fixed in this version.
&lt;p /&gt;
&lt;ol&gt;
&lt;li&gt;
There was a problem when using &lt;a href="http://www.hanselman.com/blog/ABetterASPNETMVCMobileDeviceCapabilitiesViewEngine.aspx" target="_new"&gt;auto-detecting
view engines&lt;/a&gt; when compiling under release mode. Basically, if you hit the site
with your desktop browser first, and then come in with the mobile phone, you would
still be presented the desktop version. This is now fixed. 
&lt;li&gt;
I posted about &lt;a href="http://www.distribucon.com/blog/ASPNETMVC3RC2BindingErrors.aspx" target="_new"&gt;a
problem with binding with the RC2 release&lt;/a&gt;. This also appears to be fixed. 
&lt;/ol&gt;
Throw in the &lt;a href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/" target="_new"&gt;new
scaffolding support&lt;/a&gt;, and 2011 is shaping up to be a great year for MVC.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e9083bab-855a-4e49-9732-f0fa210c31e9" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,e9083bab-855a-4e49-9732-f0fa210c31e9.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=81cc9649-a428-48de-832c-05c6296c6cf1</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,81cc9649-a428-48de-832c-05c6296c6cf1.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,81cc9649-a428-48de-832c-05c6296c6cf1.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=81cc9649-a428-48de-832c-05c6296c6cf1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I recently moved away from shared hosting,
and went to a virtual private server in order to scale a site out better. Unfortunately,
this meant that I needed to take on more administration of the server to do things
that are done for me in a shared hosting environment. One feature that I have come
to rely on is one click publishing from VS.NET 2010. In order to make this work, you
need to have <a href="http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx" target="_blank">WebDeploy</a> set
up properly. 
<p />
I found the steps from <a href="http://technet.microsoft.com/en-us/library/dd722796%28WS.10%29.aspx" target="_blank">this
page</a> to be very helpful. Another good guide can be found <a href="http://blog.salvoz.com/CommentView,guid,50c5ad5a-ce84-4c7b-aab3-63b22b1af93d.aspx#commentstart" target="_blank">here</a>. 
<p />
Be careful if you install Web Deploy via the Web Platform Installer. For some reason,
when I did this, the Management Service Delegation feature was not installed. I ended
up uninstalling and then installing straight from <a href="http://www.iis.net/download/WebDeploy" target="_blank">the
official site</a>, and the feature was available. 
<p />
I initially had some settings wrong, and was getting back HTTP 401 and 550 errors.
The log files didn't provide much help, but you can <a href="http://technet.microsoft.com/en-us/library/ff729437%28WS.10%29.aspx" target="_blank">add
tracing</a> to help diagnose the cause of most issues. <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=81cc9649-a428-48de-832c-05c6296c6cf1" /></body>
      <title>WebDeploy setup</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,81cc9649-a428-48de-832c-05c6296c6cf1.aspx</guid>
      <link>http://www.distribucon.com/blog/WebDeploySetup.aspx</link>
      <pubDate>Mon, 03 Jan 2011 16:12:24 GMT</pubDate>
      <description>I recently moved away from shared hosting, and went to a virtual private server in order to scale a site out better. Unfortunately, this meant that I needed to take on more administration of the server to do things that are done for me in a shared hosting environment. One feature that I have come to rely on is one click publishing from VS.NET 2010. In order to make this work, you need to have &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/09/13/automating-deployment-with-microsoft-web-deploy.aspx" target="_blank"&gt;WebDeploy&lt;/a&gt; set
up properly. 
&lt;p /&gt;
I found the steps from &lt;a href="http://technet.microsoft.com/en-us/library/dd722796%28WS.10%29.aspx" target="_blank"&gt;this
page&lt;/a&gt; to be very helpful. Another good guide can be found &lt;a href="http://blog.salvoz.com/CommentView,guid,50c5ad5a-ce84-4c7b-aab3-63b22b1af93d.aspx#commentstart" target="_blank"&gt;here&lt;/a&gt;. 
&lt;p /&gt;
Be careful if you install Web Deploy via the Web Platform Installer. For some reason,
when I did this, the Management Service Delegation feature was not installed. I ended
up uninstalling and then installing straight from &lt;a href="http://www.iis.net/download/WebDeploy" target="_blank"&gt;the
official site&lt;/a&gt;, and the feature was available. 
&lt;p /&gt;
I initially had some settings wrong, and was getting back HTTP 401 and 550 errors.
The log files didn't provide much help, but you can &lt;a href="http://technet.microsoft.com/en-us/library/ff729437%28WS.10%29.aspx" target="_blank"&gt;add
tracing&lt;/a&gt; to help diagnose the cause of most issues. &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=81cc9649-a428-48de-832c-05c6296c6cf1" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,81cc9649-a428-48de-832c-05c6296c6cf1.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=8ac37562-148c-40cc-aa39-ba8852cc82e2</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,8ac37562-148c-40cc-aa39-ba8852cc82e2.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,8ac37562-148c-40cc-aa39-ba8852cc82e2.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8ac37562-148c-40cc-aa39-ba8852cc82e2</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <title>ASP.NET MVC 3 RC2 binding errors</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,8ac37562-148c-40cc-aa39-ba8852cc82e2.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVC3RC2BindingErrors.aspx</link>
      <pubDate>Mon, 13 Dec 2010 02:29:59 GMT</pubDate>
      <description>I updated my web sites to &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/12/10/announcing-asp-net-mvc-3-release-candidate-2.aspx" target="_blank"&gt;ASP.NET
MVC 3 RC2&lt;/a&gt;, and started receiving exceptions when model binding. If you want the
short version, visit this &lt;a href="http://forums.asp.net/t/1632006.aspx?ASP.NET+MVC3+RC2+bug+binding+from+request+parameters+to+method+parameters" target="_blank"&gt;forum
post&lt;/a&gt; for the answer. While my errors weren't caused by the same issue that was
originally reported in that thread, the fix does work. To sum up even further, just
add this line of code in your Global.asax Application_Start method: &lt;pre&gt;&lt;code&gt; ModelMetadataProviders.Current
= new DataAnnotationsModelMetadataProvider(); &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
The longer story is that I have a pretty involved multi-step (think "wizard"), deep-level
object graph built up over many pages, so I immediately feared that I was unknowingly
exploiting some loophole that just got fixed for RC2. I built a test case, so in the
interest of not having to build that test case up from scratch again, it looked like
this:&lt;br /&gt;
&lt;b&gt;Model&lt;/b&gt; &lt;pre&gt;&lt;code&gt; public class Foo { private List&amp;lt;Bar&amp;gt; _bars; private
List&amp;lt;Baz&amp;gt; _bazs; public Foo() { _bars = new List&amp;lt;Bar&amp;gt;(); _bazs = new List&amp;lt;Baz&amp;gt;();
} public List&amp;lt;Bar&amp;gt; Bars { get { return _bars; } set { _bars = value; } } public
List&amp;lt;Baz&amp;gt; Bazs { get { return _bazs; } set { _bazs = value; } } } public class
Bar { public int Amount { get; set; } } public class Baz { public int Value { get;
set; } } &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
&lt;b&gt;Controller&lt;/b&gt; &lt;pre&gt;&lt;code&gt; public ActionResult Index() { var foo = new Foo(); foo.Bars.Add(new
Bar { Amount = 4}); foo.Bars.Add(new Bar { Amount = 23 }); foo.Bars.Add(new Bar {
Amount = 30 }); foo.Bazs.Add(new Baz { Value = 100 }); foo.Bazs.Add(new Baz { Value
= 200 }); TempData["foo"] = foo; return View(foo); } [HttpPost] public ActionResult
Index(IList&amp;lt;Bar&amp;gt; bars, IList&amp;lt;Baz&amp;gt; bazs) { Foo foo = (Foo) TempData["foo"];
foo.Bars.Clear(); foo.Bars.AddRange(bars); foo.Bazs.Clear(); foo.Bazs.AddRange(bazs);
TempData["foo"] = foo; return RedirectToAction("Summary"); } public ActionResult Summary()
{ Foo foo = (Foo)TempData["foo"]; return View(foo); } &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
&lt;b&gt;View&lt;/b&gt; &lt;pre&gt;&lt;code&gt; &amp;lt;% using(Html.BeginForm()) { %&amp;gt; &amp;lt;% int barid = 0;
foreach (var item in Model.Bars){%&amp;gt; 
&lt;br /&gt;
&amp;lt;%= Html.Hidden("Bars.index", barid) %&amp;gt; Bar:&amp;lt;%= Html.TextBox("Bars[" + barid
+"].Amount", item.Amount) %&amp;gt; &amp;lt;% barid++; }%&amp;gt; &amp;lt;% int bazid = 0; foreach
(var item in Model.Bazs) {%&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;%=Html.Hidden("Bazs.index", bazid)%&amp;gt;
Baz: &amp;lt;%=Html.TextBox("Bazs[" + bazid + "].Value", item.Value)%&amp;gt; &amp;lt;% bazid++;
}%&amp;gt; &amp;lt;p /&amp;gt; &amp;lt;input type="submit" value="Next" /&amp;gt; &amp;lt;% } %&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
I would receive the following call stack when trying to submit the form: &lt;pre&gt;&lt;code&gt; The
parameters dictionary contains an invalid entry for parameter 'bazs' for method 'System.Web.Mvc.ActionResult
Index(System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Bar], System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz])'
in 'MvcApplicationRC2.Controllers.HomeController'. The dictionary contains a value
of type 'System.Collections.Generic.List`1[MvcApplicationRC2.Models.Bar]', but the
parameter requires a value of type 'System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz]'.
Parameter name: parameters Description: An unhandled exception occurred during the
execution of the current web request. Please review the stack trace for more information
about the error and where it originated in the code. Exception Details: System.ArgumentException:
The parameters dictionary contains an invalid entry for parameter 'bazs' for method
'System.Web.Mvc.ActionResult Index(System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Bar],
System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz])' in 'MvcApplicationRC2.Controllers.HomeController'.
The dictionary contains a value of type 'System.Collections.Generic.List`1[MvcApplicationRC2.Models.Bar]',
but the parameter requires a value of type 'System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz]'.
Parameter name: parameters Source Error: An unhandled exception was generated during
the execution of the current web request. Information regarding the origin and location
of the exception can be identified using the exception stack trace below. Stack Trace:
[ArgumentException: The parameters dictionary contains an invalid entry for parameter
'bazs' for method 'System.Web.Mvc.ActionResult Index(System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Bar],
System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz])' in 'MvcApplicationRC2.Controllers.HomeController'.
The dictionary contains a value of type 'System.Collections.Generic.List`1[MvcApplicationRC2.Models.Bar]',
but the parameter requires a value of type 'System.Collections.Generic.IList`1[MvcApplicationRC2.Models.Baz]'.
Parameter name: parameters] System.Web.Mvc.ActionDescriptor.ExtractParameterFromDictionary(ParameterInfo
parameterInfo, IDictionary`2 parameters, MethodInfo methodInfo) +484514 System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;Execute&amp;gt;b__0(ParameterInfo
parameterInfo) +18 System.Linq.WhereSelectArrayIterator`2.MoveNext() +85 System.Linq.Buffer`1..ctor(IEnumerable`1
source) +325 System.Linq.Enumerable.ToArray(IEnumerable`1 source) +78 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext, IDictionary`2 parameters) +133 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +27
System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass15.&amp;lt;InvokeActionMethodWithFilters&amp;gt;b__12()
+55 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter
filter, ActionExecutingContext preContext, Func`1 continuation) +263 System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass17.&amp;lt;InvokeActionMethodWithFilters&amp;gt;b__14()
+19 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext
controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2
parameters) +191 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext
controllerContext, String actionName) +343 System.Web.Mvc.Controller.ExecuteCore()
+116 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext
requestContext) +10 System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClassb.&amp;lt;BeginProcessRequest&amp;gt;b__5()
+37 System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass1.&amp;lt;MakeVoidDelegate&amp;gt;b__0() +21
System.Web.Mvc.Async.&amp;lt;&amp;gt;c__DisplayClass8`1.&amp;lt;BeginSynchronous&amp;gt;b__7(IAsyncResult
_) +12 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62 System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClasse.&amp;lt;EndProcessRequest&amp;gt;b__d()
+50 System.Web.Mvc.SecurityUtil.&amp;lt;GetCallInAppTrustThunk&amp;gt;b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action
action) +22 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
+60 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult
result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+8841105 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously)
+184 &lt;/code&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8ac37562-148c-40cc-aa39-ba8852cc82e2" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,8ac37562-148c-40cc-aa39-ba8852cc82e2.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=8f6be955-9399-4d6a-b3ff-e6a13ee7b868</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,8f6be955-9399-4d6a-b3ff-e6a13ee7b868.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,8f6be955-9399-4d6a-b3ff-e6a13ee7b868.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8f6be955-9399-4d6a-b3ff-e6a13ee7b868</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">With the near-release of <a href="http://feeds.haacked.com/~r/haacked/~3/Xjn6-godT1g/asp-net-mvc-3-release-candidate.aspx" target="_new">ASP.NET
MVC 3</a>, I've been looking at the new <a href="http://weblogs.asp.net/scottgu/archive/2010/10/22/asp-net-mvc-3-layouts.aspx" target="_new">Razor
view engine</a>. It's quite nicely done and removes the constant "context switching"
between code and layout. 
<p />
In my web site, I used Scott Hanselman's <a href="http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx" target="_new">auto-detecting
view engine</a>, and it has served me extremely well. However, with the relentless
march of technology releases, a couple things should be pointed out: 
<p /><ul><li>
If you want to use Razor on the mobile side, you just need to inherit his original
class from <code>RazorViewEngine</code> instead of <code>WebFormViewEngine</code>.
(Obviously you should probably do this in a new class, or else the original class
name of MobileCapabeWebFormViewEngine will not exactly match up to what the class
actually does).</li><li>
The original <a href="http://mdbf.codeplex.com/" target="_new">Mobile Device Browser
File project</a> has disbanded. Very sad news, as this was a nice project that kept
on top of new smart phones as they were released. It looks like <a href="http://51degrees.codeplex.com/" target="_new">51
degrees</a> has stepped up to give us an alternative. I opened up an issue to request
providing this <a href="http://51degrees.codeplex.com/workitem/7500" target="_new">as
a NuGet package</a>. I'll definitely sign up to take this task on if it gains traction,
and they want the help.</li></ul><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8f6be955-9399-4d6a-b3ff-e6a13ee7b868" /></body>
      <title>MobileCapableWebFormViewEngine update</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,8f6be955-9399-4d6a-b3ff-e6a13ee7b868.aspx</guid>
      <link>http://www.distribucon.com/blog/MobileCapableWebFormViewEngineUpdate.aspx</link>
      <pubDate>Wed, 10 Nov 2010 02:04:33 GMT</pubDate>
      <description>With the near-release of &lt;a href="http://feeds.haacked.com/~r/haacked/~3/Xjn6-godT1g/asp-net-mvc-3-release-candidate.aspx" target="_new"&gt;ASP.NET
MVC 3&lt;/a&gt;, I've been looking at the new &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/10/22/asp-net-mvc-3-layouts.aspx" target="_new"&gt;Razor
view engine&lt;/a&gt;. It's quite nicely done and removes the constant "context switching"
between code and layout. 
&lt;p /&gt;
In my web site, I used Scott Hanselman's &lt;a href="http://www.hanselman.com/blog/MixMobileWebSitesWithASPNETMVCAndTheMobileBrowserDefinitionFile.aspx" target="_new"&gt;auto-detecting
view engine&lt;/a&gt;, and it has served me extremely well. However, with the relentless
march of technology releases, a couple things should be pointed out: 
&lt;p /&gt;
&lt;ul&gt;
&lt;li&gt;
If you want to use Razor on the mobile side, you just need to inherit his original
class from &lt;code&gt;RazorViewEngine&lt;/code&gt; instead of &lt;code&gt;WebFormViewEngine&lt;/code&gt;.
(Obviously you should probably do this in a new class, or else the original class
name of MobileCapabeWebFormViewEngine will not exactly match up to what the class
actually does).&lt;/li&gt;
&lt;li&gt;
The original &lt;a href="http://mdbf.codeplex.com/" target="_new"&gt;Mobile Device Browser
File project&lt;/a&gt; has disbanded. Very sad news, as this was a nice project that kept
on top of new smart phones as they were released. It looks like &lt;a href="http://51degrees.codeplex.com/" target="_new"&gt;51
degrees&lt;/a&gt; has stepped up to give us an alternative. I opened up an issue to request
providing this &lt;a href="http://51degrees.codeplex.com/workitem/7500" target="_new"&gt;as
a NuGet package&lt;/a&gt;. I'll definitely sign up to take this task on if it gains traction,
and they want the help.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8f6be955-9399-4d6a-b3ff-e6a13ee7b868" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,8f6be955-9399-4d6a-b3ff-e6a13ee7b868.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=af195647-2645-483d-a42e-6aed0aff1c17</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,af195647-2645-483d-a42e-6aed0aff1c17.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,af195647-2645-483d-a42e-6aed0aff1c17.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=af195647-2645-483d-a42e-6aed0aff1c17</wfw:commentRss>
      <title>LINQ to SQL: Semantics of NULL</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,af195647-2645-483d-a42e-6aed0aff1c17.aspx</guid>
      <link>http://www.distribucon.com/blog/LINQToSQLSemanticsOfNULL.aspx</link>
      <pubDate>Fri, 15 Oct 2010 17:41:07 GMT</pubDate>
      <description>Given a method like this, with the following LINQ to SQL statement in it:
&lt;pre&gt;&lt;code&gt; public
void DisplayReport(UserStatusEnum? userStatus) ... from user in DBContext.Users where
userStatus == null ? true : userStatus.Value == user.Status select user &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
I end up with the error "Nullable object must have a value". Matt Warren (one of the
original developers on the LINQ to SQL team, and a wicked smart guy), came up with
the idea to use &lt;a href="http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/d00f5611-4fce-4da4-8f79-802336fdfe1a/&gt; target="_blank"&gt;object.Equals(userStatus,
user.Status)&lt;/a&gt;, but that doesn't work for me at all in the case where userStatus
is NULL. What worked for me was to do this: &lt;pre&gt;&lt;code&gt; from user in DBContext.Users
where userStatus == null || userStatus == user.Status select user &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
The thing is, as one commenter in the linked thread mentioned, LINQ to SQL should
be a unifying syntax. We shouldn't have to distinguish between NULL and values just
because the underlying provider makes a distinction between the two. I think this
is a huge hole, but alas, one that will most likely never be plugged since LINQ to
SQL is getting deprecated. Time to check what happens in EF4...&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=af195647-2645-483d-a42e-6aed0aff1c17" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,af195647-2645-483d-a42e-6aed0aff1c17.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=0b47a01a-79f3-4f6f-af96-06d806418bd6</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,0b47a01a-79f3-4f6f-af96-06d806418bd6.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,0b47a01a-79f3-4f6f-af96-06d806418bd6.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0b47a01a-79f3-4f6f-af96-06d806418bd6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">There are many reasons WCF will toss the
generic "The remote server returned an error: NotFound" error, along with a meaningless
call stack. The easiest way to identify what specifically is causing you pain is to
enable tracing on the WCF service. To do this, add this in your web.config after your
&lt;system.serviceModel&gt; element: <pre><code> &lt;system.diagnostics&gt; &lt;sources&gt;
&lt;source name="System.ServiceModel" switchValue="Information, ActivityTracing"&gt;
&lt;listeners&gt; &lt;add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\dev\log\WcfTrace.svclog" /&gt; &lt;/listeners&gt; &lt;/source&gt;
&lt;/sources&gt; &lt;/system.diagnostics&gt; </code></pre><p />
After you run your application and error out, just double click on the c:\dev\log\WcfTrace.svclog
file. This will bring up the Microsoft Service Trace Viewer. It's a really nice tool
that highlights errors in red, so just double-click on red items and you'll eventually
get to the root exception which should give you all of the information you need to
fix things up. 
<p />
For the record, the error I was getting that started all of this was due to trying
assign an invalid value to an enum. Live and learn.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0b47a01a-79f3-4f6f-af96-06d806418bd6" /></body>
      <title>WCF NotFound error</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,0b47a01a-79f3-4f6f-af96-06d806418bd6.aspx</guid>
      <link>http://www.distribucon.com/blog/WCFNotFoundError.aspx</link>
      <pubDate>Tue, 12 Oct 2010 19:05:27 GMT</pubDate>
      <description>There are many reasons WCF will toss the generic "The remote server returned an error: NotFound" error, along with a meaningless call stack. The easiest way to identify what specifically is causing you pain is to enable tracing on the WCF service. To do this, add this in your web.config after your &amp;lt;system.serviceModel&amp;gt; element:

&lt;pre&gt;&lt;code&gt; &amp;lt;system.diagnostics&gt;
&amp;lt;sources&gt; &amp;lt;source name="System.ServiceModel" switchValue="Information, ActivityTracing"&amp;gt;
&amp;lt;listeners&amp;gt; &amp;lt;add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\dev\log\WcfTrace.svclog" /&amp;gt; &amp;lt;/listeners&amp;gt; &amp;lt;/source&amp;gt;
&amp;lt;/sources&amp;gt; &amp;lt;/system.diagnostics&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
After you run your application and error out, just double click on the c:\dev\log\WcfTrace.svclog
file. This will bring up the Microsoft Service Trace Viewer. It's a really nice tool
that highlights errors in red, so just double-click on red items and you'll eventually
get to the root exception which should give you all of the information you need to
fix things up. 
&lt;p /&gt;
For the record, the error I was getting that started all of this was due to trying
assign an invalid value to an enum. Live and learn.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0b47a01a-79f3-4f6f-af96-06d806418bd6" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,0b47a01a-79f3-4f6f-af96-06d806418bd6.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=2f555d4f-9a98-46e3-8aa4-0dbc6a20d135</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,2f555d4f-9a98-46e3-8aa4-0dbc6a20d135.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,2f555d4f-9a98-46e3-8aa4-0dbc6a20d135.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2f555d4f-9a98-46e3-8aa4-0dbc6a20d135</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I use <a href="http://stackoverflow.com/questions/653514/asp-net-mvc-model-binding-an-ilist-parameter" target="_new">list
binding</a> in my ASP.NET MVC applications in several places. When it works, it is
truly magnificent. When it doesn't, it's just maddening. Here's a quick heads up for
those of you that use list binding in MVC. You would expect the following 2 lines
to render the same HTML, but they don't. To get list binding to work, you need the
HTML to read something like this (I'm just listing the attributes in question here): 
<p /><pre><code> &lt;input name="Results[0].Score" /&gt; </code></pre><p />
The old TextBox helper works fine, since you're assigning the name attribute:<br /><pre><code> Html.TextBox("Results["+id+"].Score", Model.Score) </code></pre><p />
This code, however: <pre><code> Html.TextBoxFor(r =&gt; r.Score, new { name = "Results["
+ id + "].Score" }) </code></pre><p />
produces the following output, which means the Score property won't get bound properly. <pre><code> &lt;input
name="Score" /&gt; </code></pre><p />
The problem is that in the TextBoxFor code, the name attribute is ignored. To be more
precise, the custom name is added, but the attribute is then replaced by the name
derived from the model. <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=2f555d4f-9a98-46e3-8aa4-0dbc6a20d135" /></body>
      <title>ASP.NET MVC list binding differences between TextBox and TextBoxFor</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,2f555d4f-9a98-46e3-8aa4-0dbc6a20d135.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVCListBindingDifferencesBetweenTextBoxAndTextBoxFor.aspx</link>
      <pubDate>Wed, 24 Feb 2010 04:12:13 GMT</pubDate>
      <description>I use &lt;a href="http://stackoverflow.com/questions/653514/asp-net-mvc-model-binding-an-ilist-parameter" target="_new"&gt;list
binding&lt;/a&gt; in my ASP.NET MVC applications in several places. When it works, it is
truly magnificent. When it doesn't, it's just maddening. Here's a quick heads up for
those of you that use list binding in MVC. You would expect the following 2 lines
to render the same HTML, but they don't. To get list binding to work, you need the
HTML to read something like this (I'm just listing the attributes in question here): 
&lt;p /&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;input name="Results[0].Score" /&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
The old TextBox helper works fine, since you're assigning the name attribute:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt; Html.TextBox("Results["+id+"].Score", Model.Score) &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
This code, however: &lt;pre&gt;&lt;code&gt; Html.TextBoxFor(r =&amp;gt; r.Score, new { name = "Results["
+ id + "].Score" }) &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
produces the following output, which means the Score property won't get bound properly. &lt;pre&gt;&lt;code&gt; &amp;lt;input
name="Score" /&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
The problem is that in the TextBoxFor code, the name attribute is ignored. To be more
precise, the custom name is added, but the attribute is then replaced by the name
derived from the model. &lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=2f555d4f-9a98-46e3-8aa4-0dbc6a20d135" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,2f555d4f-9a98-46e3-8aa4-0dbc6a20d135.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=e6c300f9-9863-43da-958f-b8bfa4807a9a</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,e6c300f9-9863-43da-958f-b8bfa4807a9a.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,e6c300f9-9863-43da-958f-b8bfa4807a9a.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e6c300f9-9863-43da-958f-b8bfa4807a9a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I just updated my ASP.NET MVC 1.0 application
to use <a href="http://go.microsoft.com/fwlink/?LinkID=157071" target="_blank">ASP.NET
MVC 2 RC</a>. It was a pretty painless process. Be sure to follow the Release Notes
on the download page, and many applications will be ready to go. Here are some extra
things that might help get you unstuck:<br /><ul><li>
If you're using the ASP.NET MVC Futures (Microsoft.Web.Mvc) assembly, be sure to download
the <a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423" target="_blank">new
one that works with ASP.NET MVC 2</a>.</li><li>
If you're using the Telerik ASP.NET MVC components, be sure to download version BETA
2009.3.1218 or later.</li><li>
Way, way, way back in the ASP.NET MVC 1.0 beta days, they had a very nice mechanism
to update lists of items by tying UI fields to index numbers, so you could use primary
key identifiers to help keep track of what fields were modified where. In the 1.0
RC release, Microsoft <a href="http://forums.asp.net/p/1377775/2906357.aspx" target="_blank">changed
how it worked to do things sequentially instead</a>. I was using the IndexModelBinder
found in that thread with great success ever since then. However, Microsoft added
back in the index support to ASP.NET MVC 2 RC. This means that you will have to delete
the old IndexModelBinder since it won't compile anymore. Thankfully, I didn't have
to change a line of my code. Nice job of code compatibility!!</li></ul><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e6c300f9-9863-43da-958f-b8bfa4807a9a" /></body>
      <title>ASP.NET MVC 2 RC Changes</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,e6c300f9-9863-43da-958f-b8bfa4807a9a.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVC2RCChanges.aspx</link>
      <pubDate>Tue, 19 Jan 2010 02:52:39 GMT</pubDate>
      <description>I just updated my ASP.NET MVC 1.0 application to use &lt;a href="http://go.microsoft.com/fwlink/?LinkID=157071" target="_blank"&gt;ASP.NET
MVC 2 RC&lt;/a&gt;. It was a pretty painless process. Be sure to follow the Release Notes
on the download page, and many applications will be ready to go. Here are some extra
things that might help get you unstuck:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;
If you're using the ASP.NET MVC Futures (Microsoft.Web.Mvc) assembly, be sure to download
the &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423" target="_blank"&gt;new
one that works with ASP.NET MVC 2&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
If you're using the Telerik ASP.NET MVC components, be sure to download version BETA
2009.3.1218 or later.&lt;/li&gt;
&lt;li&gt;
Way, way, way back in the ASP.NET MVC 1.0 beta days, they had a very nice mechanism
to update lists of items by tying UI fields to index numbers, so you could use primary
key identifiers to help keep track of what fields were modified where. In the 1.0
RC release, Microsoft &lt;a href="http://forums.asp.net/p/1377775/2906357.aspx" target="_blank"&gt;changed
how it worked to do things sequentially instead&lt;/a&gt;. I was using the IndexModelBinder
found in that thread with great success ever since then. However, Microsoft added
back in the index support to ASP.NET MVC 2 RC. This means that you will have to delete
the old IndexModelBinder since it won't compile anymore. Thankfully, I didn't have
to change a line of my code. Nice job of code compatibility!!&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e6c300f9-9863-43da-958f-b8bfa4807a9a" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,e6c300f9-9863-43da-958f-b8bfa4807a9a.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Consider this code fragment:<br /><pre class="c#" name="code">
var list =<br />
from tx in Transactions<br />
group tx by new {tx.TransactionType, tx.ClientTypeID};<br /><br />
foreach (var item in list)<br />
{<br />
Console.WriteLine(item.Key.TransactionType);<br />
Console.WriteLine(item.Sum(tx =&gt; tx.Amount));<br />
foreach (var item2 in item)<br />
Console.WriteLine(item2.TransactionID);<br />
} </pre><p />
After executing the query, we now have an IGrouping&lt;AnonymousType, Transaction&gt;
that lets us run through all of the grouped objects, while still having access to
the original objects in the inner loop. We can accomplish the exact same thing with
this alternative LINQ statement, but the first version seems cleaner to me:<br /><pre class="c#" name="code">
var list =<br />
from tx in Transactions<br />
group tx by new {tx.TransactionType, tx.ClientTypeID} into g<br />
select g; </pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9" /></body>
      <title>LINQ: Query body must end with a select OR groupby clause</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9.aspx</guid>
      <link>http://www.distribucon.com/blog/LINQQueryBodyMustEndWithASelectORGroupbyClause.aspx</link>
      <pubDate>Tue, 05 Jan 2010 16:30:01 GMT</pubDate>
      <description>Consider this code fragment:&lt;br /&gt;
&lt;pre class=c# name="code"&gt;
var list =&lt;br /&gt;
from tx in Transactions&lt;br /&gt;
group tx by new {tx.TransactionType, tx.ClientTypeID};&lt;br /&gt;
&lt;br /&gt;
foreach (var item in list)&lt;br /&gt;
{&lt;br /&gt;
Console.WriteLine(item.Key.TransactionType);&lt;br /&gt;
Console.WriteLine(item.Sum(tx =&amp;gt; tx.Amount));&lt;br /&gt;
foreach (var item2 in item)&lt;br /&gt;
Console.WriteLine(item2.TransactionID);&lt;br /&gt;
} &lt;/pre&gt;
&lt;p /&gt;
After executing the query, we now have an IGrouping&amp;lt;AnonymousType, Transaction&amp;gt;
that lets us run through all of the grouped objects, while still having access to
the original objects in the inner loop. We can accomplish the exact same thing with
this alternative LINQ statement, but the first version seems cleaner to me:&lt;br /&gt;
&lt;pre class=c# name="code"&gt;
var list =&lt;br /&gt;
from tx in Transactions&lt;br /&gt;
group tx by new {tx.TransactionType, tx.ClientTypeID} into g&lt;br /&gt;
select g; &lt;/pre&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,0572ab77-105e-4ad4-b4a0-f3f6ffcd5ed9.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=7894225c-ffc2-429b-9829-a49998567094</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,7894225c-ffc2-429b-9829-a49998567094.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,7894225c-ffc2-429b-9829-a49998567094.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7894225c-ffc2-429b-9829-a49998567094</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Telerik just released an extremely impressive <a href="http://demos.telerik.com/aspnet-mvc/" target="_blank">library
of components</a> (Grid, Menu, TabStrip, and MenuBar), written for MVC. They are truly
first-class, from the architecture, to the development experience, to the finished
screens that your user sees. They released them as open-source, and even better, these
controls are written from the ground up to support ASP.NET MVC. 
<p />
Be sure to check out this awesome write up on how to <a href="http://weblogs.asp.net/rashid/archive/2009/11/05/using-telerik-mvc-grid-in-crud-scenario.aspx" target="_blank">Use
the grid in a CRUD scenario</a>. Very nicely done. 
<p />
I'm not a fan of the whole "Edit/Delete" action column. I'd much rather just have
a link on the column to take me to the detail screen. Here's the way I solved that: <pre><code> &lt;%
Html.Telerik().Grid(Model) .Name("Grid") .PrefixUrlParameters(false) .Columns(columns
=&gt; { columns.Add(o =&gt; o.CollectionDate).Template(c =&gt; { %&gt; &lt;%= Html.ActionLink(c.CollectionDate.ToShortDateString(),
"View", new { Id = c.Id })%&gt; &lt;% }).Width(40); columns.Add(o =&gt; o.Location.Name).Width(40);
}) .Scrollable() .Sortable() .Pageable() .Filterable() .Render(); %&gt; </code></pre><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=7894225c-ffc2-429b-9829-a49998567094" /></body>
      <title>Telerik Extensions for ASP.NET MVC</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,7894225c-ffc2-429b-9829-a49998567094.aspx</guid>
      <link>http://www.distribucon.com/blog/TelerikExtensionsForASPNETMVC.aspx</link>
      <pubDate>Sun, 08 Nov 2009 03:00:21 GMT</pubDate>
      <description>Telerik just released an extremely impressive &lt;a href="http://demos.telerik.com/aspnet-mvc/" target="_blank"&gt;library
of components&lt;/a&gt; (Grid, Menu, TabStrip, and MenuBar), written for MVC. They are truly
first-class, from the architecture, to the development experience, to the finished
screens that your user sees. They released them as open-source, and even better, these
controls are written from the ground up to support ASP.NET MVC. 
&lt;p /&gt;
Be sure to check out this awesome write up on how to &lt;a href="http://weblogs.asp.net/rashid/archive/2009/11/05/using-telerik-mvc-grid-in-crud-scenario.aspx" target="_blank"&gt;Use
the grid in a CRUD scenario&lt;/a&gt;. Very nicely done. 
&lt;p /&gt;
I'm not a fan of the whole "Edit/Delete" action column. I'd much rather just have
a link on the column to take me to the detail screen. Here's the way I solved that: &lt;pre&gt;&lt;code&gt; &amp;lt;%
Html.Telerik().Grid(Model) .Name("Grid") .PrefixUrlParameters(false) .Columns(columns
=&amp;gt; { columns.Add(o =&amp;gt; o.CollectionDate).Template(c =&amp;gt; { %&gt; &amp;lt;%= Html.ActionLink(c.CollectionDate.ToShortDateString(),
"View", new { Id = c.Id })%&amp;gt; &amp;lt;% }).Width(40); columns.Add(o =&amp;gt; o.Location.Name).Width(40);
}) .Scrollable() .Sortable() .Pageable() .Filterable() .Render(); %&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=7894225c-ffc2-429b-9829-a49998567094" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,7894225c-ffc2-429b-9829-a49998567094.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=30b6e8a6-7d18-49a3-825c-ea4c0c2006fc</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,30b6e8a6-7d18-49a3-825c-ea4c0c2006fc.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,30b6e8a6-7d18-49a3-825c-ea4c0c2006fc.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=30b6e8a6-7d18-49a3-825c-ea4c0c2006fc</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">Given a collection of players that were
constructed like this: <pre><code> private static IList&lt;Player&gt; LoadPlayers()
{ Player favre = new Player { Id = 1, Name = "Favre", Team = new Team { Id = 1, Name
= "Vikings" } }; Player peterson = new Player { Id = 2, Name = "Peterson", Team =
new Team { Id = 1, Name = "Vikings" } }; Player rodgers = new Player { Id = 3, Name
= "Rodgers", Team = new Team { Id = 2, Name = "Packers" } }; Player driver = new Player
{ Id = 4, Name = "Driver", Team = new Team { Id = 2, Name = "Packers" } }; List&lt;Player&gt;
players = new List&lt;Player&gt; {favre, peterson, rodgers, driver}; return players;
} </code></pre><p />
And the following LINQ query: <pre><code> var query = from p in LoadPlayers() group
p by p.Team into g select g; </code></pre><p />
We will see the following output: <pre><code> Vikings Vikings Packers Packers </code></pre><p />
The reason this is happening is that we created new Team objects for each and every
Player, and when LINQ tries to group, it does so based on object equality. The solution
to this is to <a href="http://www.developer.com/net/asp/print.php/989091" target="_blank">override
the Equals() and GetHashCode() methods</a> in the Team class. After doing that, the
LINQ query will be able to group the objects up properly and just display each team
name once. <a href="http://www.jetbrains.com/resharper/" target="_blank">Resharper</a> has
a nice code generation template to create solid implementations of these methods (press
Alt+Ins to bring up the code generation menu). 
<p />
The example here is obviously contrived. We could create each team object once, and
then use the same instance during the property assignment, and if we did that, things
would work just fine. However, I ran into a more generalized version of this problem
when using WCF and a lot of custom code generation. The underlying lesson is still
the same: LINQ and GroupBy need to have object equality defined properly in order
to make things work as you would expect.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=30b6e8a6-7d18-49a3-825c-ea4c0c2006fc" /></body>
      <title>LINQ GroupBy requires object equality</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,30b6e8a6-7d18-49a3-825c-ea4c0c2006fc.aspx</guid>
      <link>http://www.distribucon.com/blog/LINQGroupByRequiresObjectEquality.aspx</link>
      <pubDate>Fri, 16 Oct 2009 18:14:18 GMT</pubDate>
      <description>Given a collection of players that were constructed like this:
&lt;pre&gt;&lt;code&gt; private
static IList&amp;lt;Player&amp;gt; LoadPlayers() { Player favre = new Player { Id = 1, Name
= "Favre", Team = new Team { Id = 1, Name = "Vikings" } }; Player peterson = new Player
{ Id = 2, Name = "Peterson", Team = new Team { Id = 1, Name = "Vikings" } }; Player
rodgers = new Player { Id = 3, Name = "Rodgers", Team = new Team { Id = 2, Name =
"Packers" } }; Player driver = new Player { Id = 4, Name = "Driver", Team = new Team
{ Id = 2, Name = "Packers" } }; List&amp;lt;Player&amp;gt; players = new List&amp;lt;Player&amp;gt;
{favre, peterson, rodgers, driver}; return players; } &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
And the following LINQ query: &lt;pre&gt;&lt;code&gt; var query = from p in LoadPlayers() group
p by p.Team into g select g; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
We will see the following output: &lt;pre&gt;&lt;code&gt; Vikings Vikings Packers Packers &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
The reason this is happening is that we created new Team objects for each and every
Player, and when LINQ tries to group, it does so based on object equality. The solution
to this is to &lt;a href="http://www.developer.com/net/asp/print.php/989091" target="_blank"&gt;override
the Equals() and GetHashCode() methods&lt;/a&gt; in the Team class. After doing that, the
LINQ query will be able to group the objects up properly and just display each team
name once. &lt;a href="http://www.jetbrains.com/resharper/" target="_blank"&gt;Resharper&lt;/a&gt; has
a nice code generation template to create solid implementations of these methods (press
Alt+Ins to bring up the code generation menu). 
&lt;p /&gt;
The example here is obviously contrived. We could create each team object once, and
then use the same instance during the property assignment, and if we did that, things
would work just fine. However, I ran into a more generalized version of this problem
when using WCF and a lot of custom code generation. The underlying lesson is still
the same: LINQ and GroupBy need to have object equality defined properly in order
to make things work as you would expect.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=30b6e8a6-7d18-49a3-825c-ea4c0c2006fc" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,30b6e8a6-7d18-49a3-825c-ea4c0c2006fc.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=a0a5275a-0c32-409a-b8f2-7b8e02ba71d5</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,a0a5275a-0c32-409a-b8f2-7b8e02ba71d5.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,a0a5275a-0c32-409a-b8f2-7b8e02ba71d5.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a0a5275a-0c32-409a-b8f2-7b8e02ba71d5</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Given a set up like this (where ExpenseSummaryData
returns some arbitrary HTML fragment) : <pre><code> &lt;%using (Ajax.BeginForm("ExpenseSummaryData",
new AjaxOptions { UpdateTargetId = "result" })) { %&gt; &lt;label for="startDate"&gt;Start
Date:&lt;/label&gt; &lt;%= Html.TextBox("startDate") %&gt; &lt;br /&gt; &lt;label
for="endDate"&gt;End Date:&lt;/label&gt; &lt;%= Html.TextBox("endDate")%&gt; &lt;br
/&gt; &lt;input type="submit"/&gt; &lt;br /&gt; &lt;span id="result"/&gt; &lt;% }
%&gt; </code></pre><p />
If that is all your page does, you will notice that you get taken to a new page when
pressing Submit. The data on the new page is the HTML fragment returned by the AJAX
call, but that's all it contains (e.g. no master page), and it's clearly not replacing
the result span. 
<p />
The reason for this is that I forgot to add the following lines to the &lt;head&gt;
section in the original page: <pre><code> &lt;script src='&lt;%=ResolveUrl("~/Content/js/MicrosoftAjax.debug.js")%&gt;'
type="text/javascript"&gt;&lt;/script&gt; &lt;script src='&lt;%=ResolveUrl("~/Content/js/MicrosoftMvcAjax.debug.js")%&gt;'
type="text/javascript"&gt;&lt;/script&gt; </code></pre><p />
After adding those declarations in, the content in the span tag is properly updated
and it looks like a real AJAX call.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=a0a5275a-0c32-409a-b8f2-7b8e02ba71d5" /></body>
      <title>Why AJAX posts go to a new page instead of updating UpdateTargetId</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,a0a5275a-0c32-409a-b8f2-7b8e02ba71d5.aspx</guid>
      <link>http://www.distribucon.com/blog/WhyAJAXPostsGoToANewPageInsteadOfUpdatingUpdateTargetId.aspx</link>
      <pubDate>Sun, 31 May 2009 16:38:24 GMT</pubDate>
      <description>Given a set up like this (where ExpenseSummaryData returns some arbitrary HTML fragment) :
&lt;pre&gt;&lt;code&gt; &amp;lt;%using
(Ajax.BeginForm("ExpenseSummaryData", new AjaxOptions { UpdateTargetId = "result"
})) { %&amp;gt; &amp;lt;label for="startDate"&amp;gt;Start Date:&amp;lt;/label&amp;gt; &amp;lt;%= Html.TextBox("startDate")
%&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;label for="endDate"&amp;gt;End Date:&amp;lt;/label&amp;gt; &amp;lt;%= Html.TextBox("endDate")%&amp;gt;
&amp;lt;br /&amp;gt; &amp;lt;input type="submit"/&amp;gt; &amp;lt;br /&amp;gt; &amp;lt;span id="result"/&amp;gt; &amp;lt;%
} %&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
If that is all your page does, you will notice that you get taken to a new page when
pressing Submit. The data on the new page is the HTML fragment returned by the AJAX
call, but that's all it contains (e.g. no master page), and it's clearly not replacing
the result span. 
&lt;p /&gt;
The reason for this is that I forgot to add the following lines to the &amp;lt;head&amp;gt;
section in the original page: &lt;pre&gt;&lt;code&gt; &amp;lt;script src='&amp;lt;%=ResolveUrl("~/Content/js/MicrosoftAjax.debug.js")%&amp;gt;'
type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;script src='&amp;lt;%=ResolveUrl("~/Content/js/MicrosoftMvcAjax.debug.js")%&amp;gt;'
type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p /&gt;
After adding those declarations in, the content in the span tag is properly updated
and it looks like a real AJAX call.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=a0a5275a-0c32-409a-b8f2-7b8e02ba71d5" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,a0a5275a-0c32-409a-b8f2-7b8e02ba71d5.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET MVC</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=60411c85-da2d-4907-8d0a-d0949d16ffee</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,60411c85-da2d-4907-8d0a-d0949d16ffee.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,60411c85-da2d-4907-8d0a-d0949d16ffee.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=60411c85-da2d-4907-8d0a-d0949d16ffee</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been on Facebook for a while, and
I just added Twitter to the mix. I'm trying to keep communications on those sites
much more informal and fairly non-technical. If you want to follow me, search for
dmiser@wi.rr.com on Facebook or danmiser on Twitter. Hope to see you over there.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=60411c85-da2d-4907-8d0a-d0949d16ffee" /></body>
      <title>Social networking</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,60411c85-da2d-4907-8d0a-d0949d16ffee.aspx</guid>
      <link>http://www.distribucon.com/blog/SocialNetworking.aspx</link>
      <pubDate>Sat, 25 Apr 2009 17:08:10 GMT</pubDate>
      <description>I've been on Facebook for a while, and I just added Twitter to the mix. I'm trying to keep communications on those sites much more informal and fairly non-technical. If you want to follow me, search for dmiser@wi.rr.com on Facebook or danmiser on Twitter. Hope to see you over there.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=60411c85-da2d-4907-8d0a-d0949d16ffee" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,60411c85-da2d-4907-8d0a-d0949d16ffee.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=c8755312-f231-4981-8332-07422a11622a</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,c8755312-f231-4981-8332-07422a11622a.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,c8755312-f231-4981-8332-07422a11622a.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c8755312-f231-4981-8332-07422a11622a</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">Are you looking for a strong developer/architect
with a serious passion for all things technical and a unique blend of experience?
If so, feel free to <a href="mailto:dmiser@distribucon.com">email me</a>. My main
focus over the past couple of years has been on things ALT.NET-ish (e.g. ASP.NET MVC,
NHibernate, Spring.NET, etc.) while I have delved into a variety of other technologies
as well (e.g. Mindscape LightSpeed, LINQ, Dynamic Data, Delphi, etc.). If you know
of an opening - contract or full-time - please keep me in mind. I'd prefer to remain
in the Milwaukee area, but occasional travel wouldn't be the end of the world. 
<p />
Until the next technical post here, take care and thanks in advance.<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c8755312-f231-4981-8332-07422a11622a" /></body>
      <title>Looking for work</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,c8755312-f231-4981-8332-07422a11622a.aspx</guid>
      <link>http://www.distribucon.com/blog/LookingForWork.aspx</link>
      <pubDate>Wed, 22 Apr 2009 18:29:54 GMT</pubDate>
      <description>Are you looking for a strong developer/architect with a serious passion for all things technical and a unique blend of experience? If so, feel free to &lt;a href="mailto:dmiser@distribucon.com"&gt;email
me&lt;/a&gt;. My main focus over the past couple of years has been on things ALT.NET-ish
(e.g. ASP.NET MVC, NHibernate, Spring.NET, etc.) while I have delved into a variety
of other technologies as well (e.g. Mindscape LightSpeed, LINQ, Dynamic Data, Delphi,
etc.). If you know of an opening - contract or full-time - please keep me in mind.
I'd prefer to remain in the Milwaukee area, but occasional travel wouldn't be the
end of the world. 
&lt;p /&gt;
Until the next technical post here, take care and thanks in advance.&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c8755312-f231-4981-8332-07422a11622a" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,c8755312-f231-4981-8332-07422a11622a.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>Delphi</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=da104123-1fd4-4541-a102-2d93529154ca</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,da104123-1fd4-4541-a102-2d93529154ca.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,da104123-1fd4-4541-a102-2d93529154ca.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=da104123-1fd4-4541-a102-2d93529154ca</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
The first time you load an assembly of <a href="http://quartznet.sourceforge.net/" target="_blank">Quartz.NET</a> jobs,
it populates the database with the current trigger information (cron vs. simple, timings,
etc.) that it finds in the configuration file. It appears that this information does
not get updated once it's in the database. So if you want to make a change to set
the trigger time to be every minute instead of the original version of "run every
day at 2am", you will be waiting for a loooong time to see that trigger fire (unless
you start at 1:59am :)).
</p>
        <p>
Since I'm using <a href="http://code.google.com/p/migratordotnet/" target="_blank">Migrator.NET</a> to
control my database schema, I can easily drop the tables and recreate them. This isn't
a big deal because once I have things tested, I won't need to change the trigger information,
but it did trip me up for a bit so I thought I'd share.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=da104123-1fd4-4541-a102-2d93529154ca" />
      </body>
      <title>Quartz.NET trigger updates</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,da104123-1fd4-4541-a102-2d93529154ca.aspx</guid>
      <link>http://www.distribucon.com/blog/QuartzNETTriggerUpdates.aspx</link>
      <pubDate>Fri, 13 Mar 2009 04:47:18 GMT</pubDate>
      <description>&lt;p&gt;
The first time you load an assembly of &lt;a href="http://quartznet.sourceforge.net/" target="_blank"&gt;Quartz.NET&lt;/a&gt; jobs,
it populates the database with the current trigger information (cron vs. simple, timings,
etc.) that it finds in the configuration file. It appears that this information does
not get updated once it's in the database. So if you want to make a change to set
the trigger time to be every minute instead of the original version of "run every
day at 2am", you will be waiting for a loooong time to see that trigger fire (unless
you start at 1:59am :)).
&lt;/p&gt;
&lt;p&gt;
Since I'm using &lt;a href="http://code.google.com/p/migratordotnet/" target="_blank"&gt;Migrator.NET&lt;/a&gt; to
control my database schema, I can easily drop the tables and recreate them. This isn't
a big deal because once I have things tested, I won't need to change the trigger information,
but it did trip me up for a bit so I thought I'd share.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=da104123-1fd4-4541-a102-2d93529154ca" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,da104123-1fd4-4541-a102-2d93529154ca.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=b6eb635e-95be-4f1e-a5c6-3b7fa18db772</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,b6eb635e-95be-4f1e-a5c6-3b7fa18db772.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,b6eb635e-95be-4f1e-a5c6-3b7fa18db772.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b6eb635e-95be-4f1e-a5c6-3b7fa18db772</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I came across this exception today when
inserting multiple objects through an NHibernate SessionScope:<br /><pre><code> NHibernate.NonUniqueObjectException: a different object with the same
identifier value was already associated with the session: 0, of class: Foo.Entity.Bar
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister,
Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object
obj, CascadingAction action, Object anything) at NHibernate.Impl.SessionImpl.Save(Object
obj) </code></pre><p>
I didn't see much out there on this, but <a href="http://www.zorched.net" target="_blank">Geoff
Lane</a> picked up on it pretty quickly. It turns out that my Bar.hbm.xml mapping
file had set the id generator incorrectly to "generated", which was a problem because
it was actually a MSSQL IDENTITY field. The mapping should have looked like this: 
</p><p></p><pre><code> &lt;id name="Id"&gt;<br />
  &lt;generator class="native" /&gt;<br />
&lt;/id&gt;</code></pre><p>
Luckily for me, I had run my tests by trying to insert 2 entities inside the session
so the error bubbled up right away. 
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=b6eb635e-95be-4f1e-a5c6-3b7fa18db772" /></body>
      <title>NHibernate NonUniqueException</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,b6eb635e-95be-4f1e-a5c6-3b7fa18db772.aspx</guid>
      <link>http://www.distribucon.com/blog/NHibernateNonUniqueException.aspx</link>
      <pubDate>Thu, 12 Mar 2009 02:06:02 GMT</pubDate>
      <description>I came across this exception today when inserting multiple objects through an NHibernate SessionScope:&lt;br&gt;
&lt;pre&gt;&lt;code&gt; NHibernate.NonUniqueObjectException: a different object with the same
identifier value was already associated with the session: 0, of class: Foo.Entity.Bar
at NHibernate.Impl.SessionImpl.DoSave(Object obj, Object id, IEntityPersister persister,
Boolean useIdentityColumn, CascadingAction cascadeAction, Object anything) at NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object
obj, CascadingAction action, Object anything) at NHibernate.Impl.SessionImpl.Save(Object
obj) &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I didn't see much out there on this, but &lt;a href="http://www.zorched.net" target="_blank"&gt;Geoff
Lane&lt;/a&gt; picked up on it pretty quickly. It turns out that my Bar.hbm.xml mapping
file had set the id generator incorrectly to "generated", which was a problem because
it was actually a MSSQL IDENTITY field. The mapping should have looked like this: 
&lt;p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;id name="Id"&amp;gt;&lt;br&gt;
&amp;nbsp; &amp;lt;generator class="native" /&amp;gt;&lt;br&gt;
&amp;lt;/id&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Luckily for me, I had run my tests by trying to insert 2 entities inside the session
so the error bubbled up right away. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=b6eb635e-95be-4f1e-a5c6-3b7fa18db772" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,b6eb635e-95be-4f1e-a5c6-3b7fa18db772.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=52754cfb-f1c7-4264-bd08-905039f15b62</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,52754cfb-f1c7-4264-bd08-905039f15b62.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,52754cfb-f1c7-4264-bd08-905039f15b62.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=52754cfb-f1c7-4264-bd08-905039f15b62</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Yesterday, I had to upgrade from Spring.NET 1.1 to <a href="http://www.springframework.net/download.html" target="_blank">Spring.NET
1.2</a> in order to <a href="http://www.zorched.net/2009/03/07/using-quartznet-springnet-and-nhibernate-to-run-scheduled-tasks-in-aspnet/" target="_blank">use
Quartz.NET</a>. After doing that, I started to get InvalidCastException errors in
my unit tests that told me I couldn't convert an int to a Nullable&lt;int&gt;. Things
like this were broken:
</p>
        <pre>
          <code> void TestMe(int? id) { // do testing here } // and elsewhere, we call
it like this TestMe(42); </code>
        </pre>
        <p>
Very strange. It turns out that this is a <a href="http://jira.springframework.org/browse/SPRNET-1131" target="_blank">known
(and fixed) issue</a> due to using Nullable types through AOP. I grabbed the latest
nightly build and all of the tests passed again. 
</p>
        <p>
However, when running, I found a breaking change in the post-1.2.0 code that I needed
to correct, namely: 
</p>
        <p>
Overriding the SessionFactoryObjectName in web.config no longer uses Spring.Data.NHibernate.Support.OpenSessionInViewModule.SessionFactoryObjectName
as the key. Now, you need to use Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName.
e.g.
</p>
        <pre>
          <code>&lt;add key="Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName"
value="NHibernateSessionFactory" /&gt; </code>
        </pre>
        <p>
Now everything is upgraded and working again.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=52754cfb-f1c7-4264-bd08-905039f15b62" />
      </body>
      <title>Spring.NET 1.2.1 breaking change</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,52754cfb-f1c7-4264-bd08-905039f15b62.aspx</guid>
      <link>http://www.distribucon.com/blog/SpringNET121BreakingChange.aspx</link>
      <pubDate>Tue, 10 Mar 2009 19:02:30 GMT</pubDate>
      <description>&lt;p&gt;
Yesterday, I had to upgrade from Spring.NET 1.1 to &lt;a href="http://www.springframework.net/download.html" target="_blank"&gt;Spring.NET
1.2&lt;/a&gt; in order to &lt;a href="http://www.zorched.net/2009/03/07/using-quartznet-springnet-and-nhibernate-to-run-scheduled-tasks-in-aspnet/" target="_blank"&gt;use
Quartz.NET&lt;/a&gt;. After doing that, I started to get InvalidCastException errors in
my unit tests that told me I couldn't convert an int to a Nullable&amp;lt;int&amp;gt;. Things
like this were broken:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; void TestMe(int? id) { // do testing here } // and elsewhere, we call
it like this TestMe(42); &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Very strange. It turns out that this is a &lt;a href="http://jira.springframework.org/browse/SPRNET-1131" target="_blank"&gt;known
(and fixed) issue&lt;/a&gt; due to using Nullable types through AOP. I grabbed the latest
nightly build and all of the tests passed again. 
&lt;p&gt;
However, when running, I found a breaking change in the post-1.2.0 code that I needed
to correct, namely: 
&lt;p&gt;
Overriding the SessionFactoryObjectName in web.config no longer uses Spring.Data.NHibernate.Support.OpenSessionInViewModule.SessionFactoryObjectName
as the key. Now, you need to use Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName.
e.g.&lt;pre&gt;&lt;code&gt;&amp;lt;add key="Spring.Data.NHibernate.Support.SessionScope.SessionFactoryObjectName"
value="NHibernateSessionFactory" /&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Now everything is upgraded and working again.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=52754cfb-f1c7-4264-bd08-905039f15b62" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,52754cfb-f1c7-4264-bd08-905039f15b62.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=6f800a00-7b0e-449a-9a4f-1b66bc5cb220</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,6f800a00-7b0e-449a-9a4f-1b66bc5cb220.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,6f800a00-7b0e-449a-9a4f-1b66bc5cb220.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6f800a00-7b0e-449a-9a4f-1b66bc5cb220</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'll be out in L.A. for <a href="http://www.microsoftpdc.com" target="_blank">PDC</a> 10/25-10/30.
If you're going to be there, too, drop me an email!
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=6f800a00-7b0e-449a-9a4f-1b66bc5cb220" />
      </body>
      <title>Heading out to PDC</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,6f800a00-7b0e-449a-9a4f-1b66bc5cb220.aspx</guid>
      <link>http://www.distribucon.com/blog/HeadingOutToPDC.aspx</link>
      <pubDate>Thu, 02 Oct 2008 15:22:41 GMT</pubDate>
      <description>&lt;p&gt;
I'll be out in L.A. for &lt;a href="http://www.microsoftpdc.com" target="_blank"&gt;PDC&lt;/a&gt; 10/25-10/30.
If you're going to be there, too, drop me an email!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=6f800a00-7b0e-449a-9a4f-1b66bc5cb220" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,6f800a00-7b0e-449a-9a4f-1b66bc5cb220.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=5ad392b6-edc9-42c3-8fff-467e1bdf7157</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,5ad392b6-edc9-42c3-8fff-467e1bdf7157.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,5ad392b6-edc9-42c3-8fff-467e1bdf7157.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5ad392b6-edc9-42c3-8fff-467e1bdf7157</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you want to add Membership Provider features to your WebHost4Life application,
I've found that you can't use the aspnet_regsql wizard UI. Instead, use the following
code at the command prompt:
</p>
        <pre>
          <code> aspnet_regsql -C "Data Source=sqlNNN.mysite4now.com;Initial Catalog=yourdb;User
Id=yourUserName;Password=yourPwd" -A mr </code>
        </pre>
        <p>
Replace NNN with your assigned address, and obviously replace the other elements of
the above connection string, too. :-)<img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5ad392b6-edc9-42c3-8fff-467e1bdf7157" /></p>
      </body>
      <title>Adding Membership Provider to WebHost4Life web apps</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,5ad392b6-edc9-42c3-8fff-467e1bdf7157.aspx</guid>
      <link>http://www.distribucon.com/blog/AddingMembershipProviderToWebHost4LifeWebApps.aspx</link>
      <pubDate>Tue, 15 Apr 2008 21:12:01 GMT</pubDate>
      <description>&lt;p&gt;
If you want to add Membership Provider features to your WebHost4Life application,
I've found that you can't use the aspnet_regsql wizard UI. Instead, use the following
code at the command prompt:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; aspnet_regsql -C "Data Source=sqlNNN.mysite4now.com;Initial Catalog=yourdb;User
Id=yourUserName;Password=yourPwd" -A mr &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Replace NNN with your assigned address, and obviously replace the other elements of
the above connection string, too. :-)&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5ad392b6-edc9-42c3-8fff-467e1bdf7157" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,5ad392b6-edc9-42c3-8fff-467e1bdf7157.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=5e13f744-b3bd-4847-ab0d-814187f61cdb</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,5e13f744-b3bd-4847-ab0d-814187f61cdb.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,5e13f744-b3bd-4847-ab0d-814187f61cdb.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5e13f744-b3bd-4847-ab0d-814187f61cdb</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <link rel="stylesheet" type="text/css" href="/styles/csharp.css" />
        <p>
Problem: I have written my own membership provider to store and validate user information.
Further, I have a web page that allows a user to come and sign up with a username,
password, and a whole host of other client-related data. When the user submits that
data, I would like to have them logged in.
</p>
        <p>
Solution: Since I'm using Forms authentication for the ASP.NET website, it appears
that the following code-snippet does what I want:
</p>
        <pre class="csharpcode">
          <span class="kwrd">if</span> (Membership.ValidateUser(u.UserName,
u.Password)) FormsAuthentication.SetAuthCookie(u.UserName, <span class="kwrd">false</span>); </pre>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5e13f744-b3bd-4847-ab0d-814187f61cdb" />
      </body>
      <title>Programmatic ASP.NET Login</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,5e13f744-b3bd-4847-ab0d-814187f61cdb.aspx</guid>
      <link>http://www.distribucon.com/blog/ProgrammaticASPNETLogin.aspx</link>
      <pubDate>Tue, 25 Mar 2008 20:24:17 GMT</pubDate>
      <description>&lt;link rel="stylesheet" type="text/css" href="/styles/csharp.css"&gt;
&lt;p&gt;
Problem: I have written my own membership provider to store and validate user information.
Further, I have a web page that allows a user to come and sign up with a username,
password, and a whole host of other client-related data. When the user submits that
data, I would like to have them logged in.
&lt;/p&gt;
&lt;p&gt;
Solution: Since I'm using Forms authentication for the ASP.NET website, it appears
that the following code-snippet does what I want:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (Membership.ValidateUser(u.UserName,
u.Password)) FormsAuthentication.SetAuthCookie(u.UserName, &lt;span class="kwrd"&gt;false&lt;/span&gt;); &lt;/pre&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5e13f744-b3bd-4847-ab0d-814187f61cdb" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,5e13f744-b3bd-4847-ab0d-814187f61cdb.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=17afd100-c19d-4fd0-b206-658fda5c1e11</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,17afd100-c19d-4fd0-b206-658fda5c1e11.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,17afd100-c19d-4fd0-b206-658fda5c1e11.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=17afd100-c19d-4fd0-b206-658fda5c1e11</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Nikhil Kothari wrote a brilliant blog post titled <a href="http://www.nikhilk.net/Ajax-MVC.aspx" target="_blank">Ajax
with the ASP.NET MVC Framework</a>. In that post, he built a demonstration TaskList
application that used Ajax and the ASP.NET MVC framework that Microsoft is working
on. Microsoft is doing a good job in releasing more frequent updates to this framework,
but that means that there will be pain when moving from one release to the next. The
ASP.NET MVC Preview 2 release was no exception to this rule. There were a list of
documented, tedious and manual steps that one needed to follow to get their old code
running with preview 2: update web.config, change the route description, update assembly
dependencies, etc.. There were also other items that were not so well-documented: 
add ProjectTypeGuids to the csproj file, methods that fell out of the preview 2 release
(e.g. ViewFactory.CreateView), etc.
</p>
        <p>
I updated Nikhil's code, and some basic testing shows me that it's working with the
preview 2 bits. Download the updated code <a href="http://www.distribucon.com/download/dotnet/TaskListMiserMVCPreview2.zip" target="_blank">here</a>.
Please leave a comment or send me an email if you see any errors that need to be corrected.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=17afd100-c19d-4fd0-b206-658fda5c1e11" />
      </body>
      <title>Updated TaskList for Preview 2 - Ajax and MVC</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,17afd100-c19d-4fd0-b206-658fda5c1e11.aspx</guid>
      <link>http://www.distribucon.com/blog/UpdatedTaskListForPreview2AjaxAndMVC.aspx</link>
      <pubDate>Mon, 17 Mar 2008 18:21:14 GMT</pubDate>
      <description>&lt;p&gt;
Nikhil Kothari wrote a brilliant blog post titled &lt;a href="http://www.nikhilk.net/Ajax-MVC.aspx" target="_blank"&gt;Ajax
with the ASP.NET MVC Framework&lt;/a&gt;. In that post, he built a demonstration TaskList
application that used Ajax and the ASP.NET MVC framework that Microsoft is working
on. Microsoft is doing a good job in releasing more frequent updates to this framework,
but that means that there will be pain when moving from one release to the next. The
ASP.NET MVC Preview 2 release was no exception to this rule. There were a list of
documented, tedious and manual steps that one needed to follow to get their old code
running with preview 2: update web.config, change the route description, update assembly
dependencies, etc.. There were also other items that were not so well-documented:&amp;nbsp;
add ProjectTypeGuids to the csproj file, methods that fell out of the preview 2 release
(e.g. ViewFactory.CreateView), etc.
&lt;/p&gt;
&lt;p&gt;
I updated Nikhil's code, and some basic testing shows me that it's working with the
preview 2 bits. Download the updated code &lt;a href="http://www.distribucon.com/download/dotnet/TaskListMiserMVCPreview2.zip" target="_blank"&gt;here&lt;/a&gt;.
Please leave a comment or send me an email if you see any errors that need to be corrected.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=17afd100-c19d-4fd0-b206-658fda5c1e11" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,17afd100-c19d-4fd0-b206-658fda5c1e11.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=04665464-7538-43ca-8d5e-83a1b7dd63df</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,04665464-7538-43ca-8d5e-83a1b7dd63df.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,04665464-7538-43ca-8d5e-83a1b7dd63df.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=04665464-7538-43ca-8d5e-83a1b7dd63df</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=38cc4cf1-773a-47e1-8125-ba3369bf54a3&amp;displaylang=en" target="_blank">ASP.NET
MVC Preview 2</a> was released yesterday. I've had a chance to install and play with
it, and I hate to report that I am underwhelmed. My thinking leads me to believe that
MS rushed this release out the door just to be able to say they shipped <em>something</em> at
MIX. While there has been good progress made on several issues (e.g. medium-trust
support, public methods are callable by default, and route setup is improved). However,
I find several other things lacking, referenced from <a href="http://weblogs.asp.net/scottgu/archive/2008/02/12/asp-net-mvc-framework-road-map-update.aspx" target="_blank">ScottGu</a>:
</p>
        <ol>
          <li>
Source code is not released. Sure, it might be coming "soon", but why not have everything
coordinated and ready to go? Hitting an arbitrary deadline of "ship while at MIX"
is less important to me than having answers to questions like these.</li>
          <li>
Dynamic Data (scaffolding) will not work with Preview 2. It is almost always inexcusable
to take functionality and features away. The ability to scaffold is one of <strong>the</strong> coolest
things in Rails. Having something similar in ASP.NET was a welcome treat. Now it's
gone. Again, I'm sure there is something that will be released "soon", but why not
have everything ready to go? I hate not only playing catch up years later, but having
a taste of it, only to have it yanked a few weeks later.</li>
          <li>
The "choose your unit testing framework" feature that was hyped up ships with only
MSTest enabled. I understand that MS is working to enlist support from the various
unit testing groups to <a href="http://blogs.msdn.com/webdevtools/archive/2008/02/18/asp-net-mvc-test-framework-integration.aspx" target="_blank">add
their tool to the list</a>, but it seems disingenuous to post mocked up screen shots
with test frameworks in a combo box that were never developed.</li>
          <li>
Others have pointed out some more detailed issues that need solving to help with testability
(e.g. see <a href="http://feeds.feedburner.com/~r/jeffreypalermo/~3/246302878/new-drop-of-asp-net-mvc-framework-now-available.aspx" target="_blank">here</a> and <a href="http://www.paulstovell.net/blog/index.php/recommended-reading-ihttpcontext-and-versioning/" target="_blank">here</a>). 
</li>
        </ol>
        <p>
I look forward to seeing these issues addressed ASAP because I absolutely <strong>LOVE</strong> the
promise that the MVC bits hold.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=04665464-7538-43ca-8d5e-83a1b7dd63df" />
      </body>
      <title>ASP.NET MVC Preview 2 looks rushed</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,04665464-7538-43ca-8d5e-83a1b7dd63df.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVCPreview2LooksRushed.aspx</link>
      <pubDate>Fri, 07 Mar 2008 19:30:33 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=38cc4cf1-773a-47e1-8125-ba3369bf54a3&amp;amp;displaylang=en" target="_blank"&gt;ASP.NET
MVC Preview 2&lt;/a&gt; was released yesterday. I've had a chance to install and play with
it, and I hate to report that I am underwhelmed. My thinking leads me to believe that
MS rushed this release out the door just to be able to say they shipped &lt;em&gt;something&lt;/em&gt; at
MIX. While there has been good progress made on several issues (e.g. medium-trust
support, public methods are callable by default, and route setup is improved). However,
I find several other things lacking, referenced from &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/02/12/asp-net-mvc-framework-road-map-update.aspx" target="_blank"&gt;ScottGu&lt;/a&gt;:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Source code is not released. Sure, it might be coming "soon", but why not have everything
coordinated and ready to go? Hitting an arbitrary deadline of "ship while at MIX"
is less important to me than having answers to questions like these.&lt;/li&gt;
&lt;li&gt;
Dynamic Data (scaffolding) will not work with Preview 2. It is almost always inexcusable
to take functionality and features away. The ability to scaffold is one of &lt;strong&gt;the&lt;/strong&gt; coolest
things in Rails. Having something similar in ASP.NET was a welcome treat. Now it's
gone. Again, I'm sure there is something that will be released "soon", but why not
have everything ready to go? I hate not only playing catch up years later, but having
a taste of it, only to have it yanked a few weeks later.&lt;/li&gt;
&lt;li&gt;
The "choose your unit testing framework" feature that was hyped up ships with only
MSTest enabled. I understand that MS is working to enlist support from the various
unit testing groups to &lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/02/18/asp-net-mvc-test-framework-integration.aspx" target="_blank"&gt;add
their tool to the list&lt;/a&gt;, but it seems disingenuous to post mocked up screen shots
with test frameworks in a combo box that were never developed.&lt;/li&gt;
&lt;li&gt;
Others have pointed out some more detailed issues that need solving to help with testability
(e.g. see &lt;a href="http://feeds.feedburner.com/~r/jeffreypalermo/~3/246302878/new-drop-of-asp-net-mvc-framework-now-available.aspx" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://www.paulstovell.net/blog/index.php/recommended-reading-ihttpcontext-and-versioning/" target="_blank"&gt;here&lt;/a&gt;). 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
I look forward to seeing these issues addressed ASAP because I absolutely &lt;strong&gt;LOVE&lt;/strong&gt; the
promise that the MVC bits hold.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=04665464-7538-43ca-8d5e-83a1b7dd63df" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,04665464-7538-43ca-8d5e-83a1b7dd63df.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=25f4aaa1-2559-487a-9dd5-bb491e8281f0</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,25f4aaa1-2559-487a-9dd5-bb491e8281f0.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,25f4aaa1-2559-487a-9dd5-bb491e8281f0.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=25f4aaa1-2559-487a-9dd5-bb491e8281f0</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
All in all, I was very pleased with the inaugural meeting of the Milwaukee ALT.NET
group. We had a turnout of 10 people, which exceeded my expectation in quantity, and
the quality was quite good, too. We talked about general architecture topics for about
45 minutes, and then Todd Penland led the group in discussion on persistence and the <a href="http://www.martinfowler.com/eaaCatalog/unitOfWork.html" target="_blank">Unit
of Work pattern</a>. We talked about various alternatives to building this yourself
(e.g. NHibernate), and talked about the pros and cons of this approach (i.e. requiring
a <a href="http://en.wikipedia.org/wiki/Topological_sort" target="_blank">topological
sort</a> to deal with database changes properly (something near and dear to my heart
from when I was writing code for MIDAS/DataSnap and BDP), handling object graphs,
requiring a MarkDirty() call in the property setters, etc.). It was a very engaging
discussion. Thanks to everyone who showed up, and to <a href="http://www.spiderlogic.com/" target="_blank">SpiderLogic</a> for
providing the refreshments.
</p>
        <p>
Here are the details for next month:
</p>
When: Wednesday, April 9, 2008 @ 7pm<br />
Where: 10000 Innovation Drive, Suite 260 (SpiderLogic office)<br />
What: Dan Piessens (who is on the advisory panel for <a href="http://www.pnpguidance.net/Tag/Unity.aspx" target="_blank">Unity</a> and <a href="http://www.pnpguidance.net/Category/EnterpriseLibrary.aspx" target="_blank">EntLib
4.0</a>) will cover Unity and EntLib 4.0<br /><p></p><p>
I'm looking forward to it, and hope you are, too. If you're planning on being there,
please send me an email to <a href="mailto:dmiser@distribucon.com" target="_blank">dmiser@distribucon.com</a>,
or leave a comment here. That way I can plan the food and refreshments accordingly.
Feel free to drop me a line on topics you'd like to see covered, too.
</p><p><i>Updated to change the date to April 9th. This date change will allow us to hopefully
get more exposure thanks to Scott Isaacs and the WI .NET User Group. Thanks, Scott!</i><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=25f4aaa1-2559-487a-9dd5-bb491e8281f0" /></p></body>
      <title>ALT.NET Milwaukee, recap of meeting 1</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,25f4aaa1-2559-487a-9dd5-bb491e8281f0.aspx</guid>
      <link>http://www.distribucon.com/blog/ALTNETMilwaukeeRecapOfMeeting1.aspx</link>
      <pubDate>Thu, 06 Mar 2008 16:35:55 GMT</pubDate>
      <description>&lt;p&gt;
All in all, I was very pleased with the inaugural meeting of the Milwaukee ALT.NET
group. We had a turnout of 10 people, which exceeded my expectation in quantity, and
the quality was quite good, too. We talked about general architecture topics for about
45 minutes, and then Todd Penland led the group in discussion on persistence and the &lt;a href="http://www.martinfowler.com/eaaCatalog/unitOfWork.html" target="_blank"&gt;Unit
of Work pattern&lt;/a&gt;. We talked about various alternatives to building this yourself
(e.g. NHibernate), and talked about the pros and cons of this approach (i.e. requiring
a &lt;a href="http://en.wikipedia.org/wiki/Topological_sort" target="_blank"&gt;topological
sort&lt;/a&gt; to deal with database changes properly (something near and dear to my heart
from when I was writing code for MIDAS/DataSnap and BDP), handling object graphs,
requiring a MarkDirty() call in the property setters, etc.). It was a very engaging
discussion. Thanks to everyone who showed up, and to &lt;a href="http://www.spiderlogic.com/" target="_blank"&gt;SpiderLogic&lt;/a&gt; for
providing the refreshments.
&lt;/p&gt;
&lt;p&gt;
Here are the details for next month:
&lt;/p&gt;
When: Wednesday, April 9, 2008 @ 7pm&lt;br&gt;
Where: 10000 Innovation Drive, Suite 260 (SpiderLogic office)&lt;br&gt;
What: Dan Piessens (who is on the advisory panel for &lt;a href="http://www.pnpguidance.net/Tag/Unity.aspx" target="_blank"&gt;Unity&lt;/a&gt; and &lt;a href="http://www.pnpguidance.net/Category/EnterpriseLibrary.aspx" target="_blank"&gt;EntLib
4.0&lt;/a&gt;) will cover Unity and EntLib 4.0&lt;br&gt;
&lt;p&gt;
&lt;p&gt;
I'm looking forward to it, and hope you are, too. If you're planning on being there,
please send me an email to &lt;a href="mailto:dmiser@distribucon.com" target="_blank"&gt;dmiser@distribucon.com&lt;/a&gt;,
or leave a comment here. That way I can plan the food and refreshments accordingly.
Feel free to drop me a line on topics you'd like to see covered, too.
&lt;/p&gt;
&lt;p&gt;
&lt;i&gt;Updated to change the date to April 9th. This date change will allow us to hopefully
get more exposure thanks to Scott Isaacs and the WI .NET User Group. Thanks, Scott!&lt;/i&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=25f4aaa1-2559-487a-9dd5-bb491e8281f0" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,25f4aaa1-2559-487a-9dd5-bb491e8281f0.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=79592a5d-8646-4409-907e-a3de342a3645</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,79592a5d-8646-4409-907e-a3de342a3645.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,79592a5d-8646-4409-907e-a3de342a3645.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=79592a5d-8646-4409-907e-a3de342a3645</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A co-worker of mine, Brian Kapellusch, is working on a web framework to give us a
garden path for ASP.NET applications. The code that he's writing (and the code to
use it) is trés elegant. One of the underpinnings of this framework is his use of
the <a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.aspx" target="_blank">ObjectDataSource</a> class
(ODS). I am making heavy use of NHibernate and <a href="http://www.springframework.net/" target="_blank">Spring.NET</a> in
this application as well. My understanding of the ODS told me that if I wanted to
control how the source object was created, that I simply needed to handle the ObejctCreating
event and assign the desired object instance in that event to e.ObjectInstance (see <a href="http://msdn2.microsoft.com/en-us/library/ms227436.aspx" target="_blank">here</a> for
some more usage examples). 
</p>
        <p>
However, it turns out that is not enough to fully control when an object gets created.
If you set the <a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.typename.aspx" target="_blank">TypeName</a> property
to a concrete class, ODS will also create a new object behind the scenes - even if
you have handled the ObjectCreating event. This becomes <strong>very</strong> problematic
when using an IoC container to automatically build up and inject properties into your
class. 
</p>
        <p>
The bottom line is this: If you see one version of your object that has things built
up properly (because the IoC container was used properly), and one version that has
null properties (because, in essence, ODS called "new MyClass()" for you, which doesn't
let the IoC container do it's job), you should change the TypeName to point to the
interface type instead of the concrete class type. Much thanks to Brian for this one.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=79592a5d-8646-4409-907e-a3de342a3645" />
      </body>
      <title>Using ObjectDataSource with an Inversion of Control Container</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,79592a5d-8646-4409-907e-a3de342a3645.aspx</guid>
      <link>http://www.distribucon.com/blog/UsingObjectDataSourceWithAnInversionOfControlContainer.aspx</link>
      <pubDate>Tue, 26 Feb 2008 00:36:54 GMT</pubDate>
      <description>&lt;p&gt;
A co-worker of mine, Brian Kapellusch, is working on a web framework to give us a
garden path for ASP.NET applications. The code that he's writing (and the code to
use it) is trés elegant. One of the underpinnings of this framework is his use of
the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.aspx" target="_blank"&gt;ObjectDataSource&lt;/a&gt; class
(ODS). I am making heavy use of NHibernate and &lt;a href="http://www.springframework.net/" target="_blank"&gt;Spring.NET&lt;/a&gt; in
this application as well. My understanding of the ODS told me that if I wanted to
control how the source object was created, that I simply needed to handle the ObejctCreating
event and assign the desired object instance in that event to e.ObjectInstance (see &lt;a href="http://msdn2.microsoft.com/en-us/library/ms227436.aspx" target="_blank"&gt;here&lt;/a&gt; for
some more usage examples). 
&lt;/p&gt;
&lt;p&gt;
However, it turns out that is not enough to fully control when an object gets created.
If you set the &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.typename.aspx" target="_blank"&gt;TypeName&lt;/a&gt; property
to a concrete class, ODS will also create a new object behind the scenes - even if
you have handled the ObjectCreating event. This becomes &lt;strong&gt;very&lt;/strong&gt; problematic
when using an IoC container to automatically build up and inject properties into your
class. 
&lt;/p&gt;
&lt;p&gt;
The bottom line is this: If you see one version of your object that has things built
up properly (because the IoC container was used properly), and one version that has
null properties (because, in essence, ODS called "new MyClass()" for you, which doesn't
let the IoC container do it's job), you should change the TypeName to point to the
interface type instead of the concrete class type. Much thanks to Brian for this one.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=79592a5d-8646-4409-907e-a3de342a3645" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,79592a5d-8646-4409-907e-a3de342a3645.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=c481b6b9-fc4f-4194-b937-1c612b4fede8</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,c481b6b9-fc4f-4194-b937-1c612b4fede8.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,c481b6b9-fc4f-4194-b937-1c612b4fede8.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c481b6b9-fc4f-4194-b937-1c612b4fede8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I'm using <a href="http://www.nhibernate.org" target="_blank">NHibernate</a> a
lot more lately, and it's been working great. One of the downsides, though, is the
fact that you need to build up the mapping files by hand. Well, no more. I stumbled
upon the open source project, <a href="http://code.google.com/p/active-record-gen/" target="_blank">active-record-gen</a>,
on Google Code. One of the templates that it provides is one that will generate NHibernate
mapping files for tables in an MSSQL database. I tried this on a couple of databases
and it works rather well. 
<p>
A few small suggestions:
</p><ul><li>
Implement a better pluralization/singularization strategy by using <a href="http://andrewpeters.net/inflectornet/" target="_blank">Inflector.NET</a>.</li><li>
Work with more databases than just MSSQL.</li><li>
Allow for the connection string to be built up with more options. Right now, it requires
SSPI integration, and attached databases don't work as well as they should. See <a href="http://www.distribucon.com/blog/PermaLink,guid,1125.aspx" target="_blank">here</a> for
more details.</li></ul><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c481b6b9-fc4f-4194-b937-1c612b4fede8" /></body>
      <title>Generating NHibernate mapping files</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,c481b6b9-fc4f-4194-b937-1c612b4fede8.aspx</guid>
      <link>http://www.distribucon.com/blog/GeneratingNHibernateMappingFiles.aspx</link>
      <pubDate>Tue, 05 Feb 2008 13:57:18 GMT</pubDate>
      <description>I'm using &lt;a href="http://www.nhibernate.org" target="_blank"&gt;NHibernate&lt;/a&gt; a lot
more lately, and it's been working great. One of the downsides, though, is the fact
that you need to build up the mapping files by hand. Well, no more. I stumbled upon
the open source project, &lt;a href="http://code.google.com/p/active-record-gen/" target="_blank"&gt;active-record-gen&lt;/a&gt;,
on Google Code. One of the templates that it provides is one that will generate NHibernate
mapping files for tables in an MSSQL database. I tried this on a couple of databases
and it works rather well. 
&lt;p&gt;
A few small suggestions:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Implement a better pluralization/singularization strategy by using &lt;a href="http://andrewpeters.net/inflectornet/" target="_blank"&gt;Inflector.NET&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
Work with more databases than just MSSQL.&lt;/li&gt;
&lt;li&gt;
Allow for the connection string to be built up with more options. Right now, it requires
SSPI integration, and attached databases don't work as well as they should. See &lt;a href="http://www.distribucon.com/blog/PermaLink,guid,1125.aspx" target="_blank"&gt;here&lt;/a&gt; for
more details.&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=c481b6b9-fc4f-4194-b937-1c612b4fede8" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,c481b6b9-fc4f-4194-b937-1c612b4fede8.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=49eb05a0-76a2-47be-baf0-421e12d0fa10</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,49eb05a0-76a2-47be-baf0-421e12d0fa10.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,49eb05a0-76a2-47be-baf0-421e12d0fa10.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=49eb05a0-76a2-47be-baf0-421e12d0fa10</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://msdn2.microsoft.com/en-us/library/bb385902.aspx" target="_blank">This
link</a> explains the unit testing tools available in VS.NET 2008 Professional. My
take after reading that section is that Microsoft doesn't get it. Here is my list
of observations about this section. Feel free to leave a comment to tell me where
I'm wrong.
</p>
        <ul>
          <li>
I feel like this is nothing more than an upsell to get me to go and buy VS.NET TeamSystem.
Sorry, that's not going to happen. TeamSystem is way too expensive (both initially
and in setup/maintenance time for a TFS server). Besides, we have an existing development
infrastructure setup since we use multiple (non-MS) languages/platforms here.</li>
          <li>
It looks like MS wants to ignore the thriving and long-standing community of open
source unit testing tools. I'm willing to bet that <a href="http://www.nunit.org/index.php" target="_blank">NUnit</a> (and <a href="http://www.mbunit.com/" target="_blank">MbUnit</a>,
etc.) has more code using it than <a id="ctl00_LibFrame_MainContent_ctl53" onclick="javascript:Track('ctl00_LibFrame_MainContent_cpe218312_c|ctl00_LibFrame_MainContent_ctl53',this);" href="http://msdn2.microsoft.com/en-us/library/ms244252.aspx"><font color="#0000ff">Microsoft.VisualStudio.TestTools.UnitTesting</font></a>.
Yet, if I want to use the integrated Test menu in VS.NET, I need to rewrite my unit
test code to use near-identical attributes for my unit tests (e.g. [TestMethod()]
vs. [Test]).</li>
          <li>
Code coverage is not available in VS.NET Pro. I guess code coverage isn't something
that developers should be doing - well, unless they shell out tons of money to get
it done. Thankfully, there are <a href="http://www.ncover.com/download/discontinued" target="_blank">free
alternatives</a>, with cheap upgrades to the latest version.</li>
          <li>
I want to easily run and debug my unit tests. I know Resharper can do this, but I
haven't installed that in VS.NET 2008 due to the number of issues I had with it. (Yes,
I know an EAP is coming out soon, but I also have CodeRush and Refactor, which work
fine with 2008.) I like <a href="http://www.testdriven.net/" target="_blank">TestDriven.net</a>, 
but I'd like to be sure that it <a href="http://weblogs.asp.net/nunitaddin/archive/2007/07/06/microsoft-amp-testdriven-net.aspx" target="_blank">doesn't
go away</a>.</li>
          <li>
The documentation is too cluttered. If you're going to give me a list of what's included
and what's not included in the Pro version, then why not just separate the documentation
to make it easier for me to see what capabilities I have (and what I don't).</li>
        </ul>
        <p>
In short, it's disappointing that MS has chosen to force people to one specific way
of writing unit tests that is against industry norms. ASP.NET has shown me that they
do understand the provider model, so why not use it here to allow me to run and debug
my unit tests using whatever tools I want.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=49eb05a0-76a2-47be-baf0-421e12d0fa10" />
      </body>
      <title>Unit testing with VS.NET 2008 Pro</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,49eb05a0-76a2-47be-baf0-421e12d0fa10.aspx</guid>
      <link>http://www.distribucon.com/blog/UnitTestingWithVSNET2008Pro.aspx</link>
      <pubDate>Mon, 04 Feb 2008 17:01:31 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://msdn2.microsoft.com/en-us/library/bb385902.aspx" target="_blank"&gt;This
link&lt;/a&gt; explains the unit testing tools available in VS.NET 2008 Professional. My
take after reading that section is that Microsoft doesn't get it. Here is my list
of observations about this section. Feel free to leave a comment to tell me where
I'm wrong.
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
I feel like this is nothing more than an upsell to get me to go and buy VS.NET TeamSystem.
Sorry, that's not going to happen. TeamSystem is way too expensive (both initially
and in setup/maintenance time for a TFS server). Besides, we have an existing development
infrastructure setup since we use multiple (non-MS) languages/platforms here.&lt;/li&gt;
&lt;li&gt;
It looks like MS wants to ignore the thriving and long-standing community of open
source unit testing tools. I'm willing to bet that &lt;a href="http://www.nunit.org/index.php" target="_blank"&gt;NUnit&lt;/a&gt; (and &lt;a href="http://www.mbunit.com/" target="_blank"&gt;MbUnit&lt;/a&gt;,
etc.) has more code using it than &lt;a id="ctl00_LibFrame_MainContent_ctl53" onclick="javascript:Track('ctl00_LibFrame_MainContent_cpe218312_c|ctl00_LibFrame_MainContent_ctl53',this);" href="http://msdn2.microsoft.com/en-us/library/ms244252.aspx"&gt;&lt;font color="#0000ff"&gt;Microsoft.VisualStudio.TestTools.UnitTesting&lt;/font&gt;&lt;/a&gt;.
Yet, if I want to use the integrated Test menu in VS.NET, I need to rewrite my unit
test code to use near-identical attributes for my unit tests (e.g. [TestMethod()]
vs. [Test]).&lt;/li&gt;
&lt;li&gt;
Code coverage is not available in VS.NET Pro. I guess code coverage isn't something
that developers should be doing - well, unless they shell out tons of money to get
it done. Thankfully, there are &lt;a href="http://www.ncover.com/download/discontinued" target="_blank"&gt;free
alternatives&lt;/a&gt;, with cheap upgrades to the latest version.&lt;/li&gt;
&lt;li&gt;
I want to easily run and debug my unit tests. I know Resharper can do this, but I
haven't installed that in VS.NET 2008 due to the number of issues I had with it. (Yes,
I know an EAP is coming out soon, but I also have CodeRush and Refactor, which work
fine with 2008.) I like &lt;a href="http://www.testdriven.net/" target="_blank"&gt;TestDriven.net&lt;/a&gt;,&amp;nbsp;
but I'd like to be sure that it &lt;a href="http://weblogs.asp.net/nunitaddin/archive/2007/07/06/microsoft-amp-testdriven-net.aspx" target="_blank"&gt;doesn't
go away&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
The documentation is too cluttered. If you're going to give me a list of what's included
and what's not included in the Pro version, then why not just separate the documentation
to make it easier for me to see what capabilities I have (and what I don't).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In short, it's disappointing that MS has chosen to force people to one specific way
of writing unit tests that is against industry norms. ASP.NET has shown me that they
do understand the provider model, so why not use it here to allow me to run and debug
my unit tests using whatever tools I want.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=49eb05a0-76a2-47be-baf0-421e12d0fa10" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,49eb05a0-76a2-47be-baf0-421e12d0fa10.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=f7300437-a68d-4f9f-befd-e4a6ebc932cc</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,f7300437-a68d-4f9f-befd-e4a6ebc932cc.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,f7300437-a68d-4f9f-befd-e4a6ebc932cc.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f7300437-a68d-4f9f-befd-e4a6ebc932cc</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I would like to take it upon myself to announce the formation of the Milwaukee chapter
of the ALT.NET UserGroup. It will meet the first Wednesday of every month, with the
first meeting to take place on 3/5/08 @ 7pm at 10000 Innovation Drive, Milwaukee,
WI. Pizza and drinks will be served, and the event will be free to attend. Thanks
to <a href="http://www.spiderlogic.com" target="_blank">SpiderLogic</a> for sponsoring
the first meeting.
</p>
        <p>
This group will cover agile development tools and techniques with .NET, best practices
for architecture and coding, emerging technologies, and anything else the group decides
to cover. For more backstory on ALT.NET, read <a href="http://www.distribucon.com/blog/PermaLink,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx" target="_blank">this
post</a>. The use group will be a very participant-driven group. I will not look to
lead this group in any significant way, other than to call this group to order, and
get people involved in sustaining it. I've learned from other user groups that if
a group is too dependent upon one person, it is a matter of time before it fails.
</p>
        <p>
For the first meeting's agenda, I propose we get some volunteers to take on some minimum
responsibilities and then break into an <a href="http://en.wikipedia.org/wiki/Open_Space_Technology" target="_blank">OpenSpaces</a> format,
where technical topics will be presented by anyone who wants to present. I don't want
this to be yet another 1-way presentation medium for 1-2 hour topics, so be prepared
to be engaged, discuss, and share (bring your laptop to showcase code and/or slides).
I'll take a swipe at talking about ASP.NET MVC this first meeting. If you have something
you want to see covered, or especially if you want to cover something, post a comment,
and we'll get it on the agenda.
</p>
        <p>
Please pass this notice around to anyone you think will be interested! If you plan
on attending, I would appreciate either a comment on this blog or email to <a href="mailto:dmiser@distribucon.com">dmiser@distribucon.com</a>,
just so we can gauge how much food and drink to have on hand. I am really excited
about this, and look forward to seeing everyone there!!
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=f7300437-a68d-4f9f-befd-e4a6ebc932cc" />
      </body>
      <title>ALT.NET UserGroup, Milwaukee Chapter</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,f7300437-a68d-4f9f-befd-e4a6ebc932cc.aspx</guid>
      <link>http://www.distribucon.com/blog/ALTNETUserGroupMilwaukeeChapter.aspx</link>
      <pubDate>Fri, 01 Feb 2008 21:46:14 GMT</pubDate>
      <description>&lt;p&gt;
I would like to take it upon myself to announce the formation of the Milwaukee chapter
of the ALT.NET UserGroup. It will meet the first Wednesday of every month, with the
first meeting to take place on 3/5/08 @ 7pm at 10000 Innovation Drive, Milwaukee,
WI. Pizza and drinks will be served, and the event will be free to attend. Thanks
to &lt;a href="http://www.spiderlogic.com" target="_blank"&gt;SpiderLogic&lt;/a&gt; for sponsoring
the first meeting.
&lt;/p&gt;
&lt;p&gt;
This group will cover agile development tools and techniques with .NET, best practices
for architecture and coding, emerging technologies, and anything else the group decides
to cover. For more backstory on ALT.NET, read &lt;a href="http://www.distribucon.com/blog/PermaLink,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx" target="_blank"&gt;this
post&lt;/a&gt;. The use group will be a very participant-driven group. I will not look to
lead this group in any significant way, other than to call this group to order, and
get people involved in sustaining it. I've learned from other user groups that if
a group is too dependent upon one person, it is a matter of time before it fails.
&lt;/p&gt;
&lt;p&gt;
For the first meeting's agenda, I propose we get some volunteers to take on some minimum
responsibilities and then break into an &lt;a href="http://en.wikipedia.org/wiki/Open_Space_Technology" target="_blank"&gt;OpenSpaces&lt;/a&gt; format,
where technical topics will be presented by anyone who wants to present. I don't want
this to be yet another 1-way presentation medium for 1-2 hour topics, so be prepared
to be engaged, discuss, and share (bring your laptop to showcase code and/or slides).
I'll take a swipe at talking about ASP.NET MVC this first meeting. If you have something
you want to see covered, or especially if you want to cover something, post a comment,
and we'll get it on the agenda.
&lt;/p&gt;
&lt;p&gt;
Please pass this notice around to anyone you think will be interested! If you plan
on attending, I would appreciate either a comment on this blog or email to &lt;a href="mailto:dmiser@distribucon.com"&gt;dmiser@distribucon.com&lt;/a&gt;,
just so we can gauge how much food and drink to have on hand. I am really excited
about this, and look forward to seeing everyone there!!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=f7300437-a68d-4f9f-befd-e4a6ebc932cc" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,f7300437-a68d-4f9f-befd-e4a6ebc932cc.aspx</comments>
      <category>.NET</category>
      <category>ALT.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=819d903f-b3c6-448e-ba57-83ec077dd150</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,819d903f-b3c6-448e-ba57-83ec077dd150.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,819d903f-b3c6-448e-ba57-83ec077dd150.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=819d903f-b3c6-448e-ba57-83ec077dd150</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have a .NET application that generates an XML file via serialization (through XmlTextWriter)
and submits the data via https. Recently, they changed something on their end to only
accept an upper cased UTF-8 encoding, like this:
</p>
        <pre>
          <code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; </code>
        </pre>
        <p>
Unfortunately, using the .NET classes mentioned above, it generates the encoding string
in lower case. I could find one mention of this on google, and they said to have the
other company change (not an option here), or override XmlTextWriter. I went with
that approach, making heavy use of <a href="http://www.aisto.com/roeder/dotnet" target="_blank">Reflector</a> along
the way. I started by looking at the WriteStartDocument method, but realized that
the private StartDocument is the thing that generates the output. It also gets called
by the overloaded WriteStartDocument, so I'd need to override that method, too. However,
in the private StartDocument method, it uses a bunch of private variables and generates
output via another private method, InternalWriteProcessingInstructions. Ugly. At this
point I realize that XmlTextWriter is not a class made for inheriting. 
</p>
        <p>
Back to Reflector, and I notice that the Encoding.WebName is the property used to
write out the encoding string. I now create a descendant class of UTF8Encoding. The
class is listed below. Now I just call XmlTextWriter, passing in UpperCaseUTF8Encoding.UpperCaseUTF8
for the Encoding type, and everything works perfectly. 
</p>
        <pre class="code">
          <span style="color: rgb(0,0,255)">public</span>
          <span style="color: rgb(0,0,255)">class</span>
          <span style="color: rgb(43,145,175)">UpperCaseUTF8Encoding</span> : <span style="color: rgb(43,145,175)">UTF8Encoding </span> { <span style="color: rgb(0,0,255)">public</span><span style="color: rgb(0,0,255)">override</span><span style="color: rgb(0,0,255)">string</span> WebName
{ <span style="color: rgb(0,0,255)">get</span> { <span style="color: rgb(0,0,255)">return</span><span style="color: rgb(0,0,255)">base</span>.WebName.ToUpper();
} } <span style="color: rgb(0,0,255)">public</span><span style="color: rgb(0,0,255)">static</span><span style="color: rgb(43,145,175)">UpperCaseUTF8Encoding</span> UpperCaseUTF8
{ <span style="color: rgb(0,0,255)">get </span> { <span style="color: rgb(0,0,255)">if</span> (upperCaseUtf8Encoding
== <span style="color: rgb(0,0,255)">null</span>) upperCaseUtf8Encoding = <span style="color: rgb(0,0,255)">new</span><span style="color: rgb(43,145,175)">UpperCaseUTF8Encoding</span>(); <span style="color: rgb(0,0,255)">return</span> upperCaseUtf8Encoding;
} } <span style="color: rgb(0,0,255)">private</span><span style="color: rgb(0,0,255)">static</span><span style="color: rgb(43,145,175)">UpperCaseUTF8Encoding</span> upperCaseUtf8Encoding
= <span style="color: rgb(0,0,255)">null</span>; }</pre>
        <a href="http://11011.net/software/vspaste">
          <a href="http://11011.net/software/vspaste">
            <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=819d903f-b3c6-448e-ba57-83ec077dd150" />
          </a>
        </a>
      </body>
      <title>Making the Encoding property upper case during XmlSerialization</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,819d903f-b3c6-448e-ba57-83ec077dd150.aspx</guid>
      <link>http://www.distribucon.com/blog/MakingTheEncodingPropertyUpperCaseDuringXmlSerialization.aspx</link>
      <pubDate>Tue, 29 Jan 2008 18:23:57 GMT</pubDate>
      <description>&lt;p&gt;
I have a .NET application that generates an XML file via serialization (through XmlTextWriter)
and submits the data via https. Recently, they changed something on their end to only
accept an upper cased UTF-8 encoding, like this:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
Unfortunately, using the .NET classes mentioned above, it generates the encoding string
in lower case. I could find one mention of this on google, and they said to have the
other company change (not an option here), or override XmlTextWriter. I went with
that approach, making heavy use of &lt;a href="http://www.aisto.com/roeder/dotnet" target="_blank"&gt;Reflector&lt;/a&gt; along
the way. I started by looking at the WriteStartDocument method, but realized that
the private StartDocument is the thing that generates the output. It also gets called
by the overloaded WriteStartDocument, so I'd need to override that method, too. However,
in the private StartDocument method, it uses a bunch of private variables and generates
output via another private method, InternalWriteProcessingInstructions. Ugly. At this
point I realize that XmlTextWriter is not a class made for inheriting. 
&lt;p&gt;
Back to Reflector, and I notice that the Encoding.WebName is the property used to
write out the encoding string. I now create a descendant class of UTF8Encoding. The
class is listed below. Now I just call XmlTextWriter, passing in UpperCaseUTF8Encoding.UpperCaseUTF8
for the Encoding type, and everything works perfectly. &lt;pre class="code"&gt;    &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;class&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UpperCaseUTF8Encoding&lt;/span&gt; : &lt;span style="color: rgb(43,145,175)"&gt;UTF8Encoding &lt;/span&gt; { &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;override&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;string&lt;/span&gt; WebName
{ &lt;span style="color: rgb(0,0,255)"&gt;get&lt;/span&gt; { &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;base&lt;/span&gt;.WebName.ToUpper();
} } &lt;span style="color: rgb(0,0,255)"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UpperCaseUTF8Encoding&lt;/span&gt; UpperCaseUTF8
{ &lt;span style="color: rgb(0,0,255)"&gt;get &lt;/span&gt; { &lt;span style="color: rgb(0,0,255)"&gt;if&lt;/span&gt; (upperCaseUtf8Encoding
== &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;) upperCaseUtf8Encoding = &lt;span style="color: rgb(0,0,255)"&gt;new&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UpperCaseUTF8Encoding&lt;/span&gt;(); &lt;span style="color: rgb(0,0,255)"&gt;return&lt;/span&gt; upperCaseUtf8Encoding;
} } &lt;span style="color: rgb(0,0,255)"&gt;private&lt;/span&gt; &lt;span style="color: rgb(0,0,255)"&gt;static&lt;/span&gt; &lt;span style="color: rgb(43,145,175)"&gt;UpperCaseUTF8Encoding&lt;/span&gt; upperCaseUtf8Encoding
= &lt;span style="color: rgb(0,0,255)"&gt;null&lt;/span&gt;; }&lt;/pre&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=819d903f-b3c6-448e-ba57-83ec077dd150" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,819d903f-b3c6-448e-ba57-83ec077dd150.aspx</comments>
      <category>.NET</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I had a need to move some VB.NET code to C# today. We're still not at the point where
we can just mix and match languages within an assembly, and in this case, it would
be more work than I wanted to separate things out. I looked around the net, and the
best code converter that I found (read: it successfully converted everything I threw
at it, where others failed) was <a href="http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx" target="_blank">this
one</a>.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1" />
      </body>
      <title>VB.NET to C# conversion</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1.aspx</guid>
      <link>http://www.distribucon.com/blog/VBNETToCConversion.aspx</link>
      <pubDate>Thu, 24 Jan 2008 15:36:42 GMT</pubDate>
      <description>&lt;p&gt;
I had a need to move some VB.NET code to C# today. We're still not at the point where
we can just mix and match languages within an assembly, and in this case, it would
be more work than I wanted to separate things out. I looked around the net, and the
best code converter that I found (read: it successfully converted everything I threw
at it, where others failed) was &lt;a href="http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx" target="_blank"&gt;this
one&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,198eb2f0-2898-4f8e-9f6d-b1726e3a5fb1.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=b976217f-2f8e-44f1-9e5b-a52e2e8713ce</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,b976217f-2f8e-44f1-9e5b-a52e2e8713ce.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,b976217f-2f8e-44f1-9e5b-a52e2e8713ce.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b976217f-2f8e-44f1-9e5b-a52e2e8713ce</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
To be sure, this is an incomplete list, but it is a good start. Here's what I don't
like about LINQ to SQL:
</p>
        <ul>
          <li>
It only works with MSSQL. Yes, this point has been beaten to death, but it is entirely
justified. <a href="http://code2code.net/DB_Linq/" target="_blank">Third party solutions</a> don't
cut it. LINQ to SQL intentionally seeks to exclude a sizeable population because of
this hair-brained decision. 
</li>
          <li>
No way to easily specify adhoc LINQ queries. <a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" target="_blank">This</a> doesn't
count. I know the benefits of design-time queries, but I should also be allowed to
shoot myself to get the added flexibility if I so choose. Building up expression trees
is not a viable option for every day development. 
</li>
          <li>
The constant labeling of LINQ to SQL as an OR/M. That label considerably overstates
what this technology does. One to one mapping between a table and a class is not really
OR/M. It seems like they want to force you to change your database by writing stored
procs and views to make your object model better. 
</li>
          <li>
There is no automated way to easily pick up changes to the database schema. 
</li>
          <li>
There is no easy way to preserve changes to the generated code. e.g. I change the
name of the automatically generated class from collection_details to CollectionDetails,
but I evolve the schema of the table. When I re-add the table, I need to set all of
the custom properties again. I know I shouldn't change generated code, but see the
next point. 
</li>
          <li>
Speaking of collection_details, it would be much better if the underlying class generator
had some options to clean up legacy table names (e.g. remove underscores, camel case
resulting table and column names). 
</li>
          <li>
No many-to-many support. In short, when you have an <a href="http://en.wikipedia.org/wiki/Associative_Entities" target="_blank">junction
table</a> (aka associative table or cross-reference table), you will need to write
code like this: User.UserPermissions[0].Permission vs. User.Permissions[0]. Until
we see LINQ to Entity (if ever), we do have <a href="http://blogs.msdn.com/mitsu/archive/2007/06/21/how-to-implement-a-many-to-many-relationship-using-linq-to-sql.aspx" target="_blank">this</a>,
but you can't use the new entity in a LINQ query. 
</li>
          <li>
There is no built-in solution to using LINQ across tiers. I don't want to expose my
LINQ classes (see the point above about the tight coupling between database and objects)
as I may want to change my database, and I don't want that cascading to all of the
places that use it. There is also no diffgram, so even if I did it, I would have to
write my own change tracking and resolving support. I went to an OpenSpaces meeting
on this very topic during CodeMash, and the consensus was not flattering.</li>
        </ul>
        <p>
In short, it seems like this part of LINQ was released way before it was ready. But
it does demo well...
</p>
        <p>
Feel free to add your own grievance to the comments.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=b976217f-2f8e-44f1-9e5b-a52e2e8713ce" />
      </body>
      <title>Things I Don't Like About LINQ to SQL</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,b976217f-2f8e-44f1-9e5b-a52e2e8713ce.aspx</guid>
      <link>http://www.distribucon.com/blog/ThingsIDontLikeAboutLINQToSQL.aspx</link>
      <pubDate>Fri, 11 Jan 2008 18:23:26 GMT</pubDate>
      <description>&lt;p&gt;
To be sure, this is an incomplete list, but it is a good start. Here's what I don't
like about LINQ to SQL:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
It only works with MSSQL. Yes, this point has been beaten to death, but it is entirely
justified. &lt;a href="http://code2code.net/DB_Linq/" target="_blank"&gt;Third party solutions&lt;/a&gt; don't
cut it. LINQ to SQL intentionally seeks to exclude a sizeable population because of
this hair-brained decision. 
&lt;li&gt;
No way to easily specify adhoc LINQ queries. &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx" target="_blank"&gt;This&lt;/a&gt; doesn't
count. I know the benefits of design-time queries, but I should also be allowed to
shoot myself to get the added flexibility if I so choose. Building up expression trees
is not a viable option for every day development. 
&lt;li&gt;
The constant labeling of LINQ to SQL as an OR/M. That label considerably overstates
what this technology does. One to one mapping between a table and a class is not really
OR/M. It seems like they want to force you to change your database by writing stored
procs and views to make your object model better. 
&lt;li&gt;
There is no automated way to easily pick up changes to the database schema. 
&lt;li&gt;
There is no easy way to preserve changes to the generated code. e.g. I change the
name of the automatically generated class from collection_details to CollectionDetails,
but I evolve the schema of the table. When I re-add the table, I need to set all of
the custom properties again. I know I shouldn't change generated code, but see the
next point. 
&lt;li&gt;
Speaking of collection_details, it would be much better if the underlying class generator
had some options to clean up legacy table names (e.g. remove underscores, camel case
resulting table and column names). 
&lt;li&gt;
No many-to-many support. In short, when you have an &lt;a href="http://en.wikipedia.org/wiki/Associative_Entities" target="_blank"&gt;junction
table&lt;/a&gt; (aka associative table or cross-reference table), you will need to write
code like this: User.UserPermissions[0].Permission vs. User.Permissions[0]. Until
we see LINQ to Entity (if ever), we do have &lt;a href="http://blogs.msdn.com/mitsu/archive/2007/06/21/how-to-implement-a-many-to-many-relationship-using-linq-to-sql.aspx" target="_blank"&gt;this&lt;/a&gt;,
but you can't use the new entity in a LINQ query. 
&lt;li&gt;
There is no built-in solution to using LINQ across tiers. I don't want to expose my
LINQ classes (see the point above about the tight coupling between database and objects)
as I may want to change my database, and I don't want that cascading to all of the
places that use it. There is also no diffgram, so even if I did it, I would have to
write my own change tracking and resolving support. I went to an OpenSpaces meeting
on this very topic during CodeMash, and the consensus was not flattering.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In short, it seems like this part of LINQ was released way before it was ready. But
it does demo well...
&lt;/p&gt;
&lt;p&gt;
Feel free to add your own grievance to the comments.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=b976217f-2f8e-44f1-9e5b-a52e2e8713ce" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,b976217f-2f8e-44f1-9e5b-a52e2e8713ce.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=ecaf0c3a-f630-4fc9-8a20-b53fac515c8f</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,ecaf0c3a-f630-4fc9-8a20-b53fac515c8f.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,ecaf0c3a-f630-4fc9-8a20-b53fac515c8f.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ecaf0c3a-f630-4fc9-8a20-b53fac515c8f</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been reading Dustin Campbell's series, <a href="http://diditwith.net/2007/12/29/TwelveDaysOfRefactorXmasDayTenRefactoringInXMLLiterals.aspx" target="_blank">The
12 Days of Refactor! X-mas</a>, with interest. He's a very good writer, and has broken
down a bunch of Developer Express features into easy to digest chunks of information.
</p>
        <p>
The episode I linked to above touched on the <a href="http://msdn2.microsoft.com/en-us/library/ms364068%28vs.80%29.aspx#vb9overview_topic6" target="_blank">XML
Literal</a> support that shipped with VB in Visual Studio 2008. The one sentence summary
of this technology is that it lets the VB compiler translate raw XML in the source
code into strongly-typed code using XML classes under the hood. It's a very nice idea,
and I encourage you to look at the links to learn a little more about it.
</p>
        <p>
While the VB team thought this was a good idea and added the feature, Anders and the
C# team believed that it was superfluous to add such a thing to the C# side. I haven't
really made up my mind which group I side with yet. However, Anders is benevolent
:-), so he gave us the little-documented PasteXmlAsLinq addin that will take XML on
the clipboard and paste it into a file in C# syntax building the XML up using classes
like XElement.
</p>
        <p>
In a default install of VS2008, open C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples.zip
and extract the LinqSamples\PasteXmlAsLinq files. There is a Readme.html file in there
that tells you how to build, install and use the addin. 
</p>
        <p>
While this isn't the same as VB's support for XML Literals, it does make things easier
to work with. 
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=ecaf0c3a-f630-4fc9-8a20-b53fac515c8f" />
      </body>
      <title>VB XML Literal support in C#</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,ecaf0c3a-f630-4fc9-8a20-b53fac515c8f.aspx</guid>
      <link>http://www.distribucon.com/blog/VBXMLLiteralSupportInC.aspx</link>
      <pubDate>Sun, 30 Dec 2007 23:02:25 GMT</pubDate>
      <description>&lt;p&gt;
I have been reading Dustin Campbell's series, &lt;a href="http://diditwith.net/2007/12/29/TwelveDaysOfRefactorXmasDayTenRefactoringInXMLLiterals.aspx" target="_blank"&gt;The
12 Days of Refactor! X-mas&lt;/a&gt;, with interest. He's a very good writer, and has broken
down a bunch of Developer Express features into easy to digest chunks of information.
&lt;/p&gt;
&lt;p&gt;
The episode I linked to above touched on the &lt;a href="http://msdn2.microsoft.com/en-us/library/ms364068%28vs.80%29.aspx#vb9overview_topic6" target="_blank"&gt;XML
Literal&lt;/a&gt; support that shipped with VB in Visual Studio 2008. The one sentence summary
of this technology is that it lets the VB compiler translate raw XML in the source
code into strongly-typed code using XML classes under the hood. It's a very nice idea,
and I encourage you to look at the links to learn a little more about it.
&lt;/p&gt;
&lt;p&gt;
While the VB team thought this was a good idea and added the feature, Anders and the
C# team believed that it was superfluous to add such a thing to the C# side. I haven't
really made up my mind which group I side with yet. However, Anders is benevolent
:-), so he gave us the little-documented PasteXmlAsLinq addin that will take XML on
the clipboard and paste it into a file in C# syntax building the XML up using classes
like XElement.
&lt;/p&gt;
&lt;p&gt;
In a default install of VS2008, open C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033\CSharpSamples.zip
and extract the LinqSamples\PasteXmlAsLinq files. There is a Readme.html file in there
that tells you how to build, install and use the addin. 
&lt;/p&gt;
&lt;p&gt;
While this isn't the same as VB's support for XML Literals, it does make things easier
to work with. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=ecaf0c3a-f630-4fc9-8a20-b53fac515c8f" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,ecaf0c3a-f630-4fc9-8a20-b53fac515c8f.aspx</comments>
      <category>.NET</category>
      <category>LINQ</category>
      <category>XML</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=d78e55cd-4acd-4ae3-819a-e63d9b6275df</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,d78e55cd-4acd-4ae3-819a-e63d9b6275df.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,d78e55cd-4acd-4ae3-819a-e63d9b6275df.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d78e55cd-4acd-4ae3-819a-e63d9b6275df</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
At the risk of another "Me, too!" post, I thought I'd highlight several links that
I have found to be helpful, and for a value-added bonus, talk about why this release
matters to me. Back in the day (oh boy, does that make me sound old!), I learned how
to program for the Internet by using straight HTML and Delphi to create CGI and ISAPI
extensions. In order to do this, you needed to be quite aware of how the actual protocols
worked, and what to do to make things behave as you'd expect. I stayed with web development
up until I was using COM objects (again, written in Delphi) from an ASP page. After
that, I wasn't into the web development scene much on a full-time basis.
</p>
        <p>
ASP.NET 1.0 and 2.0 came along, and I found them to be quite daunting. It seemed as
if it was framework built upon framework, layered with add-ins to do what I thought
used to be simple things. 
</p>
        <p>
It appears to me that there has been a resurgence to move away from the barrage of
constant abstractions, and to instead embrace the simplicity of the web (see the popularity
of REST, Rails, and the buzz around ASP.NET MVC for some examples of this). 
</p>
        <p>
So for me, the reason I am excited is that not only can I once again utilize my knowledge
about how the web works, but I can use it in new ways that will make my applications
even better (e.g. TDD, scaffolding, etc.). At any rate, here's the set of links that
I think matter for ASP.NET MVC: 
</p>
        <ul>
          <li>
            <a href="http://asp.net/downloads/3.5-extensions/" target="_blank">ASP.NET Extensions
download</a> - including the MVC bits 
</li>
          <li>
            <a href="http://asp.net/downloads/3.5-extensions/MVCToolkit.zip" target="_blank">MVC
Toolkit</a> - extra download to help with scaffolding (aka dynamic data controls) 
</li>
          <li>
Scott Guthrie's series of tutorials: <a href="http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx" target="_blank">Part
1</a>, <a href="http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx" target="_blank">Part
2</a>, <a href="http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc-framework-part-3-passing-viewdata-from-controllers-to-views.aspx" target="_blank">Part
3</a>, and <a href="http://weblogs.asp.net/scottgu/archive/2007/12/09/asp-net-mvc-framework-part-4-handling-form-edit-and-post-scenarios.aspx" target="_blank">Part
4</a></li>
          <li>
            <a href="http://www.hanselman.com/blog/ASPNET35ExtensionsPlusMVCHowToScreencast.aspx" target="_blank">Scott
Hanselman's video tutorial on the MVC framework</a>
          </li>
          <li>
            <a href="http://haacked.com/" target="_blank">Phil Haack's blog</a> (good posts on
dependency injection and TDD, among others) 
</li>
          <li>
            <a href="http://blog.wekeroad.com/" target="_blank">Rob Conery's blog</a> (check out
the posts on the MVC UI helpers and REST) 
</li>
        </ul>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d78e55cd-4acd-4ae3-819a-e63d9b6275df" />
      </body>
      <title>ASP.NET MVC CTP released</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,d78e55cd-4acd-4ae3-819a-e63d9b6275df.aspx</guid>
      <link>http://www.distribucon.com/blog/ASPNETMVCCTPReleased.aspx</link>
      <pubDate>Mon, 10 Dec 2007 20:40:56 GMT</pubDate>
      <description>&lt;p&gt;
At the risk of another "Me, too!" post, I thought I'd highlight several links that
I have found to be helpful, and for a value-added bonus, talk about why this release
matters to me. Back in the day (oh boy, does that make me sound old!), I learned how
to program for the Internet by using straight HTML and Delphi to create CGI and ISAPI
extensions. In order to do this, you needed to be quite aware of how the actual protocols
worked, and what to do to make things behave as you'd expect. I stayed with web development
up until I was using COM objects (again, written in Delphi) from an ASP page. After
that, I wasn't into the web development scene much on a full-time basis.
&lt;/p&gt;
&lt;p&gt;
ASP.NET 1.0 and 2.0 came along, and I found them to be quite daunting. It seemed as
if it was framework built upon framework, layered with add-ins to do what I thought
used to be simple things. 
&lt;/p&gt;
&lt;p&gt;
It appears to me that there has been a resurgence to move away from the barrage of
constant abstractions, and to instead embrace the simplicity of the web (see the popularity
of REST, Rails, and the buzz around ASP.NET MVC for some examples of this). 
&lt;/p&gt;
&lt;p&gt;
So for me, the reason I am excited is that not only can I once again utilize my knowledge
about how the web works, but I can use it in new ways that will make my applications
even better (e.g. TDD, scaffolding, etc.). At any rate, here's the set of links that
I think matter for ASP.NET MVC: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://asp.net/downloads/3.5-extensions/" target="_blank"&gt;ASP.NET Extensions
download&lt;/a&gt; - including the MVC bits 
&lt;li&gt;
&lt;a href="http://asp.net/downloads/3.5-extensions/MVCToolkit.zip" target="_blank"&gt;MVC
Toolkit&lt;/a&gt; - extra download to help with scaffolding (aka dynamic data controls) 
&lt;li&gt;
Scott Guthrie's series of tutorials: &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx" target="_blank"&gt;Part
1&lt;/a&gt;, &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx" target="_blank"&gt;Part
2&lt;/a&gt;, &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/12/06/asp-net-mvc-framework-part-3-passing-viewdata-from-controllers-to-views.aspx" target="_blank"&gt;Part
3&lt;/a&gt;, and &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/12/09/asp-net-mvc-framework-part-4-handling-form-edit-and-post-scenarios.aspx" target="_blank"&gt;Part
4&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://www.hanselman.com/blog/ASPNET35ExtensionsPlusMVCHowToScreencast.aspx" target="_blank"&gt;Scott
Hanselman's video tutorial on the MVC framework&lt;/a&gt; 
&lt;li&gt;
&lt;a href="http://haacked.com/" target="_blank"&gt;Phil Haack's blog&lt;/a&gt; (good posts on
dependency injection and TDD, among others) 
&lt;li&gt;
&lt;a href="http://blog.wekeroad.com/" target="_blank"&gt;Rob Conery's blog&lt;/a&gt; (check out
the posts on the MVC UI helpers and REST) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d78e55cd-4acd-4ae3-819a-e63d9b6275df" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,d78e55cd-4acd-4ae3-819a-e63d9b6275df.aspx</comments>
      <category>.NET</category>
      <category>ASP.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=28ea6032-a07d-49b2-bfa3-7eb60522f908</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,28ea6032-a07d-49b2-bfa3-7eb60522f908.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,28ea6032-a07d-49b2-bfa3-7eb60522f908.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=28ea6032-a07d-49b2-bfa3-7eb60522f908</wfw:commentRss>
      <title>CodeMash</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,28ea6032-a07d-49b2-bfa3-7eb60522f908.aspx</guid>
      <link>http://www.distribucon.com/blog/CodeMash.aspx</link>
      <pubDate>Fri, 07 Dec 2007 20:26:22 GMT</pubDate>
      <description>&lt;p&gt;
I wanted to attend CodeMash last year, but waiting until the last minute worked against
me. This year I made sure to commit to the event early, so I just signed up and got
my hotel reservations sorted out. The sessions look to be pretty deep for a smaller
conference, and I'm excited about going there to talk shop.
&lt;/p&gt;
&lt;p&gt;
If you'll be going, drop me a line via comment here, and we'll be sure to sit down
and have a beverage or 2. If you're in the Milwaukee/Madison area, and want to chat
ALT.NET, it might be a good place to formally plan and launch the Milwaukee meetup.
&lt;/p&gt;
&lt;p&gt;
Hope to see you there! 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.codemash.org/"&gt;&lt;img alt="CodeMash &amp;ndash; I&amp;amp;apos;ll be there!" src="http://www.codemash.org/images/bloggerbadge2008.gif"&gt;&lt;/a&gt;&lt;a href="http://www.codemash.org/"&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=28ea6032-a07d-49b2-bfa3-7eb60522f908" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,28ea6032-a07d-49b2-bfa3-7eb60522f908.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=e2072bde-838f-4b18-8885-607394b10639</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,e2072bde-838f-4b18-8885-607394b10639.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,e2072bde-838f-4b18-8885-607394b10639.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e2072bde-838f-4b18-8885-607394b10639</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you see an error like the following:
</p>
        <pre>
          <code>MSB6006: "NCover.Console.exe" exited with code 1. in build.proj(93, 3)</code>
        </pre>
        <p>
be sure to check that you are using the correct version of CoverLib.dll. In older
versions of NCover (e.g. 1.5.8), by default, this dll should be registered every time
the NCover task is run. I haven't found that to be true, though. I had an older version
of NCover installed somewhere else on the build machine, and I kept on having my build
fail because version 1.5.8 of NCover.Console.exe was loading version 1.5.5 of CoverLib.dll.
</p>
        <p>
By manually registering the correct version of CoverLib.dll, I got the build working
again.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e2072bde-838f-4b18-8885-607394b10639" />
      </body>
      <title>CC.NET: NCover.Console exited with code 1</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,e2072bde-838f-4b18-8885-607394b10639.aspx</guid>
      <link>http://www.distribucon.com/blog/CCNETNCoverConsoleExitedWithCode1.aspx</link>
      <pubDate>Tue, 27 Nov 2007 04:21:48 GMT</pubDate>
      <description>&lt;p&gt;
If you see an error like the following:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;MSB6006: "NCover.Console.exe" exited with code 1. in build.proj(93, 3)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
be sure to check that you are using the correct version of CoverLib.dll. In older
versions of NCover (e.g. 1.5.8), by default, this dll should be registered every time
the NCover task is run. I haven't found that to be true, though. I had an older version
of NCover installed somewhere else on the build machine, and I kept on having my build
fail because version 1.5.8 of NCover.Console.exe was loading version 1.5.5 of CoverLib.dll.
&lt;/p&gt;
&lt;p&gt;
By manually registering the correct version of CoverLib.dll, I got the build working
again.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=e2072bde-838f-4b18-8885-607394b10639" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,e2072bde-838f-4b18-8885-607394b10639.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=d1e0db1f-577c-49d3-803e-a38193b786a0</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,d1e0db1f-577c-49d3-803e-a38193b786a0.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,d1e0db1f-577c-49d3-803e-a38193b786a0.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d1e0db1f-577c-49d3-803e-a38193b786a0</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here is my quick and dirty laundry list of issues that I've been having with MSBuild
over the past few days. 
</p>
        <ul>
          <li>
You can't detect which target is being executed, therefore conditional execution of
tasks cannot be driven by targets. Instead, you need to start a crazy chain of adding
targets and updating properties and adding the new target to DependsOnTargets for
the original target. No wonder the build file becomes unwieldy so quickly. 
</li>
          <li>
It is very unintuitive and cumbersome to update property values. If I want to set
a property one way in one case, and another way in a different case, it is not easy.
Besides, the syntax for the CreateProperty task is way more complex than it needs
to be to simply update a property. 
</li>
          <li>
Brutal gymnastics are required to get around customizing build properties outside
of the confines of the Configuration mechanism for a given project. For example, let's
say I want to change the DocumentationFile parameter used in csc.exe, or change the
NoWarn directive. If you're calling an MSBuild task on your solution, you need to
specify those command-line parameters as /p: parameters from the command-line or track
what you want to do and add the actual command-line parameters to the Properties attribute.
It should be as simple as overriding the default build properties that exist in the
csproj file, but that doesn't work. 
</li>
          <li>
It lacks a way to list descriptive tags for all defined targets (c.f. "nant -projecthelp").</li>
        </ul>
        <p>
Apparently, I'm <a href="http://martinfowler.com/bliki/BuildLanguage.html" target="_blank">not
the only one</a> who sees this as a problem. I think Martin's idea of using a lightweight/script
language to control the build is the way to go. Granted, I'm coming to this conclusion
4 years after he is, but the point is still valid today. I'd like to have more language
elements in my build process to deal with branch, loop and flow so I can react better
than I can with an XML file.
</p>
        <p>
My bottom line: MSBuild may be a good tool for VS.NET to use because it can tightly
control the format, but it is not a generic solution for controlling a medium-to-big
size build process. 
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d1e0db1f-577c-49d3-803e-a38193b786a0" />
      </body>
      <title>Why MSBuild sucks</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,d1e0db1f-577c-49d3-803e-a38193b786a0.aspx</guid>
      <link>http://www.distribucon.com/blog/WhyMSBuildSucks.aspx</link>
      <pubDate>Fri, 09 Nov 2007 16:45:29 GMT</pubDate>
      <description>&lt;p&gt;
Here is my quick and dirty laundry list of issues that I've been having with MSBuild
over the past few days. 
&lt;ul&gt;
&lt;li&gt;
You can't detect which target is being executed, therefore conditional execution of
tasks cannot be driven by targets. Instead, you need to start a crazy chain of adding
targets and updating properties and adding the new target to DependsOnTargets for
the original target. No wonder the build file becomes unwieldy so quickly. 
&lt;li&gt;
It is very unintuitive and cumbersome to update property values. If I want to set
a property one way in one case, and another way in a different case, it is not easy.
Besides, the syntax for the CreateProperty task is way more complex than it needs
to be to simply update a property. 
&lt;li&gt;
Brutal gymnastics are required to get around customizing build properties outside
of the confines of the Configuration mechanism for a given project. For example, let's
say I want to change the DocumentationFile parameter used in csc.exe, or change the
NoWarn directive. If you're calling an MSBuild task on your solution, you need to
specify those command-line parameters as /p: parameters from the command-line or track
what you want to do and add the actual command-line parameters to the Properties attribute.
It should be as simple as overriding the default build properties that exist in the
csproj file, but that doesn't work. 
&lt;li&gt;
It lacks a way to list descriptive tags for all defined targets (c.f. "nant -projecthelp").&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Apparently, I'm &lt;a href="http://martinfowler.com/bliki/BuildLanguage.html" target="_blank"&gt;not
the only one&lt;/a&gt; who sees this as a problem. I think Martin's idea of using a lightweight/script
language to control the build is the way to go. Granted, I'm coming to this conclusion
4 years after he is, but the point is still valid today. I'd like to have more language
elements in my build process to deal with branch, loop and flow so I can react better
than I can with an XML file.
&lt;/p&gt;
&lt;p&gt;
My bottom line: MSBuild may be a good tool for VS.NET to use because it can tightly
control the format, but it is not a generic solution for controlling a medium-to-big
size build process. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d1e0db1f-577c-49d3-803e-a38193b786a0" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,d1e0db1f-577c-49d3-803e-a38193b786a0.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=8827a2ad-75a2-4c42-a839-6e0666d69cc3</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,8827a2ad-75a2-4c42-a839-6e0666d69cc3.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,8827a2ad-75a2-4c42-a839-6e0666d69cc3.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8827a2ad-75a2-4c42-a839-6e0666d69cc3</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I've had some conversations with people about the label of ALT.NET. They are of the
opinion that it causes controversy by setting up the "elitist" vs. "everyone else"
mentality. This is not a new observations (see <a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/10/14/my-official-alt-net-recap.aspx" target="_blank">here</a> and <a href="http://martinfowler.com/bliki/AltNetConf.html" target="_blank">here</a>,
e.g.).
</p>
        <p>
I'd like to propose that the divisiveness of the ALT.NET moniker be abolished as quickly
as possible. To that end, my proposal for the name is Pragmatic.NET. It's both a state
of mind and an homage to the Pragmatic Programmer series that touches on several of
the topics important to this group.
</p>
        <p>
Discuss...
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8827a2ad-75a2-4c42-a839-6e0666d69cc3" />
      </body>
      <title>Pragmatic.NET</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,8827a2ad-75a2-4c42-a839-6e0666d69cc3.aspx</guid>
      <link>http://www.distribucon.com/blog/PragmaticNET.aspx</link>
      <pubDate>Thu, 08 Nov 2007 17:54:09 GMT</pubDate>
      <description>&lt;p&gt;
I've had some conversations with people about the label of ALT.NET. They are of the
opinion that it causes controversy by setting up the "elitist" vs. "everyone else"
mentality. This is not a new observations (see &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2007/10/14/my-official-alt-net-recap.aspx" target="_blank"&gt;here&lt;/a&gt;&amp;nbsp;and &lt;a href="http://martinfowler.com/bliki/AltNetConf.html" target="_blank"&gt;here&lt;/a&gt;,
e.g.).
&lt;/p&gt;
&lt;p&gt;
I'd like to propose that the divisiveness of the ALT.NET moniker be abolished as quickly
as possible. To that end, my proposal for the name is Pragmatic.NET. It's both a state
of mind and an homage to the Pragmatic Programmer series that touches on several of
the topics important to this group.
&lt;/p&gt;
&lt;p&gt;
Discuss...
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8827a2ad-75a2-4c42-a839-6e0666d69cc3" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,8827a2ad-75a2-4c42-a839-6e0666d69cc3.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=8d7106a3-0697-4fe8-8bb7-04bb88f8f80d</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=8d7106a3-0697-4fe8-8bb7-04bb88f8f80d</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm more than a little disappointed that I missed the <a href="http://altnetconf.com/participants" target="_blank">ALT.NET
conference in Austin</a>, but I'm extremely happy that it looks like the movement
has crystallized and gained enough momentum to be a legitimate option for .NET developers.
Steve Kronsnoble made an analogy to the <a href="http://agilemanifesto.org/history.html" target="_blank">Agile
Manifesto</a>, where it took a bunch of informal participants and related ideas
and turned them into industry standards. Hopefully, when looking back on this event
years from now, people will be able to identify this as the genesis of  .NET.
</p>
        <p>
I really like the idea of <a href="http://altdotnet.org/" target="_blank">ALT.NET</a>,
and it maps to discussions I've had with many developers about trying to find a "Garden
Path" of .NET development. Some percentage of .NET developers will use whatever Microsoft
tells them to without question. That's fine, but that's not how I think. I like to
grab the best technology no matter where I find it (Open Source, other languages,
etc.) . I want to talk about things like <a href="http://www.nhibernate.org/" target="_blank">NHibernate</a>, <a href="http://www.springframework.net/" target="_blank">Spring.NET</a>, <a href="http://www.codeplex.com/subsonic" target="_blank">Subsonic</a>, <a href="http://feeds.feedburner.com/~r/ScottHanselman/~3/181552579/DevConnectionsTheASPNETMVCFramework.aspx" target="_blank">the
new</a><a href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx" target="_blank">ASP.MVC</a> framework,
Domain Driven Design, Test Driven Design, Unit Testing, and on and on. To me, that's
the excitement of ALT.NET.
</p>
        <p>
To do my part, I'd like to start a discussion on where and when to hold a local
Milwaukee version of this <a href="http://martinfowler.com/bliki/OpenSpace.html" target="_blank">OpenSpace
conference</a>. If you're passionate about .NET development and want to help shape
this new movement in the Milwaukee area, please leave a comment so we can find a way
to move the ball forward.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8d7106a3-0697-4fe8-8bb7-04bb88f8f80d" />
      </body>
      <title>ALT.NET, Milwaukee Chapter</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx</guid>
      <link>http://www.distribucon.com/blog/ALTNETMilwaukeeChapter.aspx</link>
      <pubDate>Thu, 08 Nov 2007 16:02:04 GMT</pubDate>
      <description>&lt;p&gt;
I'm more than a little disappointed that I missed the &lt;a href="http://altnetconf.com/participants" target="_blank"&gt;ALT.NET
conference in Austin&lt;/a&gt;, but I'm extremely happy that it looks like the movement
has crystallized and gained enough momentum to be a legitimate option for .NET developers.
Steve Kronsnoble&amp;nbsp;made an analogy to the &lt;a href="http://agilemanifesto.org/history.html" target="_blank"&gt;Agile
Manifesto&lt;/a&gt;, where it&amp;nbsp;took a bunch of informal participants and related ideas
and turned them into industry standards. Hopefully, when looking back on this event
years from now, people will be able to identify this as the genesis of&amp;nbsp; .NET.
&lt;/p&gt;
&lt;p&gt;
I really like the idea of &lt;a href="http://altdotnet.org/" target="_blank"&gt;ALT.NET&lt;/a&gt;,
and it maps to discussions I've had with many developers about trying to find a "Garden
Path" of .NET development. Some percentage of .NET developers will use whatever Microsoft
tells them to without question. That's fine, but that's not how I think. I like to
grab the best technology no matter where I find it (Open Source, other languages,
etc.)&amp;nbsp;. I want to talk about things like &lt;a href="http://www.nhibernate.org/" target="_blank"&gt;NHibernate&lt;/a&gt;, &lt;a href="http://www.springframework.net/" target="_blank"&gt;Spring.NET&lt;/a&gt;, &lt;a href="http://www.codeplex.com/subsonic" target="_blank"&gt;Subsonic&lt;/a&gt;, &lt;a href="http://feeds.feedburner.com/~r/ScottHanselman/~3/181552579/DevConnectionsTheASPNETMVCFramework.aspx" target="_blank"&gt;the
new&lt;/a&gt; &lt;a href="http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx" target="_blank"&gt;ASP.MVC&lt;/a&gt; framework,
Domain Driven Design, Test Driven Design, Unit Testing, and on and on. To me, that's
the excitement of ALT.NET.
&lt;/p&gt;
&lt;p&gt;
To do my part,&amp;nbsp;I'd like to start a discussion on where and when to hold a local
Milwaukee version of this &lt;a href="http://martinfowler.com/bliki/OpenSpace.html" target="_blank"&gt;OpenSpace
conference&lt;/a&gt;. If you're passionate about .NET development and want to help shape
this new movement in the Milwaukee area, please leave a comment so we can find a way
to move the ball forward.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=8d7106a3-0697-4fe8-8bb7-04bb88f8f80d" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,8d7106a3-0697-4fe8-8bb7-04bb88f8f80d.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=5d258460-68ac-43e8-80a8-1835cd16390e</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,5d258460-68ac-43e8-80a8-1835cd16390e.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,5d258460-68ac-43e8-80a8-1835cd16390e.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5d258460-68ac-43e8-80a8-1835cd16390e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">I've been working more with data-binding
and the ObjectBindingSource component that <a href="http://www.distribucon.com/blog/PermaLink,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx" target="_new">I
wrote about here</a>. Here is some stripped-down sample code to help investigate more
data-binding concepts. <pre><code>class Customer { int Id; BindingList<ORDER>
Orders; } class Order { int OrderNumber; Product ProductInfo; } class Product { string
Vendor; Product Self; }
</ORDER></code></pre>Assume that we want individual GUI components for the Customer
object, and a grid to display the associated orders, with the related Product information
displayed along with the Order. Here are some quick pseudo-code tips to get things
wired up properly. 
<ul><li>
CustomerObjectBindingSource.DataSource = typeof(Customer) 
</li><li>
CustomerObjectBindingSource.BindableProperties.Add("Orders"). (If you don't do this,
the detail ObjectBindingSource won't work later on.) 
</li><li>
OrdersObjectBindingSource.DataSource = CustomerObjectBindingSource and OrdersObjectBindingSource.DataMember
= "Orders" 
</li><li>
OrdersObjectBindingSource.BindableProperties.Add("Product") 
</li><li>
DataGridView.DataSource = OrdersObjectBindingSource 
</li><li>
Modify the DataGridView column for Product by setting: 
<ul><li>
column.DataSource = ProductsBindingSource 
</li><li>
column.DisplayMember = "Name" 
</li><li>
column.ValueMember = Self</li></ul></li><li><b>**IMPORTANT**</b> - Use the same object references everywhere for the product objects
(i.e. in the DataGridView column and where you access them in your code). In the sample,
I use the productBindingSource component for both the lookup in the grid and the way
to lookup individual Product instances. Another alternative that I tested is to use
a singleton class for the collection. If you don't do this, you will get the dreaded
"DataGridViewComboBoxCell value is not valid" error when the grid tries to populate
the Product value.</li></ul><p>
For concrete details, <a href="http://www.distribucon.com/download/dotnet/DataGridObjectsBinding.zip" target="_new">download
this project</a>. I look forward to your comments.
</p><img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5d258460-68ac-43e8-80a8-1835cd16390e" /></body>
      <title>Using ObjectBindingSource for master/detail scenarios</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,5d258460-68ac-43e8-80a8-1835cd16390e.aspx</guid>
      <link>http://www.distribucon.com/blog/UsingObjectBindingSourceForMasterdetailScenarios.aspx</link>
      <pubDate>Tue, 06 Nov 2007 05:26:17 GMT</pubDate>
      <description>I've been working more with data-binding and the ObjectBindingSource component that &lt;a href="http://www.distribucon.com/blog/PermaLink,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx" target=_new&gt;I
wrote about here&lt;/a&gt;. Here is some stripped-down sample code to help investigate more
data-binding concepts. &lt;pre&gt;&lt;code&gt;class Customer { int Id; BindingList&lt;ORDER&gt;
Orders; } class Order { int OrderNumber; Product ProductInfo; } class Product { string
Vendor; Product Self; }
&lt;/code&gt;&lt;/pre&gt;Assume that we want individual GUI components for the Customer object,
and a grid to display the associated orders, with the related Product information
displayed along with the Order. Here are some quick pseudo-code tips to get things
wired up properly. 
&lt;ul&gt;
&lt;li&gt;
CustomerObjectBindingSource.DataSource = typeof(Customer) 
&lt;li&gt;
CustomerObjectBindingSource.BindableProperties.Add("Orders"). (If you don't do this,
the detail ObjectBindingSource won't work later on.) 
&lt;li&gt;
OrdersObjectBindingSource.DataSource = CustomerObjectBindingSource and OrdersObjectBindingSource.DataMember
= "Orders" 
&lt;li&gt;
OrdersObjectBindingSource.BindableProperties.Add("Product") 
&lt;li&gt;
DataGridView.DataSource = OrdersObjectBindingSource 
&lt;li&gt;
Modify the DataGridView column for Product by setting: 
&lt;ul&gt;
&lt;li&gt;
column.DataSource = ProductsBindingSource 
&lt;li&gt;
column.DisplayMember = "Name" 
&lt;li&gt;
column.ValueMember = Self&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
&lt;b&gt;**IMPORTANT**&lt;/b&gt; - Use the same object references everywhere for the product objects
(i.e. in the DataGridView column and where you access them in your code). In the sample,
I use the productBindingSource component for both the lookup in the grid and the way
to lookup individual Product instances. Another alternative that I tested is to use
a singleton class for the collection. If you don't do this, you will get the dreaded
"DataGridViewComboBoxCell value is not valid" error when the grid tries to populate
the Product value.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
For concrete details, &lt;a href="http://www.distribucon.com/download/dotnet/DataGridObjectsBinding.zip" target=_new&gt;download
this project&lt;/a&gt;. I look forward to your comments.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=5d258460-68ac-43e8-80a8-1835cd16390e" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,5d258460-68ac-43e8-80a8-1835cd16390e.aspx</comments>
      <category>.NET</category>
    </item>
    <item>
      <trackback:ping>http://www.distribucon.com/blog/Trackback.aspx?guid=d23c9802-5669-4e57-bf30-eed8afdd7bd0</trackback:ping>
      <pingback:server>http://www.distribucon.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.distribucon.com/blog/PermaLink,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx</pingback:target>
      <dc:creator>Dan Miser</dc:creator>
      <wfw:comment>http://www.distribucon.com/blog/CommentView,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx</wfw:comment>
      <wfw:commentRss>http://www.distribucon.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d23c9802-5669-4e57-bf30-eed8afdd7bd0</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Subtitle: How to force .NET Grids to respect Object-Oriented designs
</p>
        <p>
Microsoft clearly intended the DataGridView to be used with databases and primitives.
With the company inventing .NET making it difficult to write GUIs with a proper domain
model, it's no wonder that the majority of .NET code out there is littered with data-access
metaphors. 
</p>
        <p>
Take the following code (yes, I know there are fields here, but it takes less space): 
</p>
        <pre>
          <code>
            <!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red43\green145\blue175;}??\fs20     \cf3 public\cf0  \cf3 class\cf0  \cf4 County\par ??\cf0     \{\par ??        \cf3 public\cf0  County()\par ??        \{\par ??        \}\par ??        \par ??        \cf3 public\cf0  County(\cf3 string\cf0  name, \cf3 double\cf0  taxRate) : \cf3 this\cf0 ()\par ??        \{\par ??            \cf3 this\cf0 .name = name;\par ??            \cf3 this\cf0 .taxRate = taxRate;\par ??        \}\par ??\par ??        \cf3 public\cf0  \cf3 string\cf0  name;\par ??        \cf3 public\cf0  \cf3 double\cf0  taxRate;\par ??    \}\par ??}
-->
            <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
              <p style="margin: 0px">
                <span style="color: blue">public</span>
                <span style="color: blue">class</span>
                <span style="color: #2b91af">County</span>
              </p>
              <p style="margin: 0px">
{
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span> County() {}
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span><span style="color: blue">string</span> name;
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span><span style="color: blue">double</span> taxRate;
</p>
              <p style="margin: 0px">
}
</p>
            </div>
            <!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red43\green145\blue175;}??\fs20     \cf3 public\cf0  \cf3 class\cf0  \cf4 CountyTax\par ??\cf0     \{\par ??        \cf3 public\cf0  CountyTax()\par ??        \{\par ??        \}\par ??\par ??        \cf3 public\cf0  \cf4 County\cf0  County;\par ??        \cf3 public\cf0  \cf3 double\cf0  Amount;\par ??    \}\par ??}
-->
            <div style="font-size: 10pt; background: white; color: black; font-family: consolas">
              <p style="margin: 0px">
                <span style="color: blue">public</span>
                <span style="color: blue">class</span>
                <span style="color: #2b91af">CountyTax</span>
              </p>
              <p style="margin: 0px">
{
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span> CountyTax() {}
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span><span style="color: #2b91af">County</span> County;
</p>
              <p style="margin: 0px">
    <span style="color: blue">public</span><span style="color: blue">double</span> Amount;
</p>
              <p style="margin: 0px">
}
</p>
            </div>
          </code>
        </pre>
        <p>
There is no way out of the box to get a DataGridView to display and edit the CountyTax
object's County and Amount fields. I'd like to have a combo box to display a list
of county names, select one, and then enter an amount. Later, I can calculate the
tax by multiplying the TaxRate for the selected county and the Amount I entered. In
other words, I want to employ good domain design principles. 
</p>
        <p>
Here are a couple of solutions, depending on whether or not you want to <a href="http://www.developer-corner.com/Resources/KnowledgeBase/tabid/118/articleType/ArticleView/articleId/28/Default.aspx" target="_new">add
extra code to each grid, and use reflection</a> or <a href="http://www.codeproject.com/useritems/ObjectBindingSource.asp?msg=2288270" target="_new">get
some design-time support in a fairly encapsulated solution with faster-than-reflection
performance</a>. 
</p>
        <p>
I haven't had a chance to check out Orcas, but I can only hope that Microsoft has
finally seen the light and will treat object-oriented developers to a fully functioning
grid.
</p>
        <img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d23c9802-5669-4e57-bf30-eed8afdd7bd0" />
      </body>
      <title>Displaying Nested Objects in a DataGridView</title>
      <guid isPermaLink="false">http://www.distribucon.com/blog/PermaLink,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx</guid>
      <link>http://www.distribucon.com/blog/DisplayingNestedObjectsInADataGridView.aspx</link>
      <pubDate>Sun, 28 Oct 2007 03:59:37 GMT</pubDate>
      <description>&lt;p&gt;
Subtitle: How to force .NET Grids to respect Object-Oriented designs
&lt;/p&gt;
&lt;p&gt;
Microsoft clearly intended the DataGridView&amp;nbsp;to be used with databases and primitives.
With the company inventing .NET making it difficult to write GUIs with a proper domain
model, it's no wonder that the majority of .NET code out there is littered with data-access
metaphors. 
&lt;p&gt;
Take the following code (yes, I know there are fields here, but it takes less space): &lt;pre&gt;&lt;code&gt; 
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red43\green145\blue175;}??\fs20     \cf3 public\cf0  \cf3 class\cf0  \cf4 County\par ??\cf0     \{\par ??        \cf3 public\cf0  County()\par ??        \{\par ??        \}\par ??        \par ??        \cf3 public\cf0  County(\cf3 string\cf0  name, \cf3 double\cf0  taxRate) : \cf3 this\cf0 ()\par ??        \{\par ??            \cf3 this\cf0 .name = name;\par ??            \cf3 this\cf0 .taxRate = taxRate;\par ??        \}\par ??\par ??        \cf3 public\cf0  \cf3 string\cf0  name;\par ??        \cf3 public\cf0  \cf3 double\cf0  taxRate;\par ??    \}\par ??}
--&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;County&lt;/span&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
{
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; County() {}
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; name;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;double&lt;/span&gt; taxRate;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
}
&lt;/p&gt;
&lt;/div&gt;
&lt;!--
{\rtf1\ansi\ansicpg\lang1024\noproof1252\uc1 \deff0{\fonttbl{\f0\fnil\fcharset0\fprq1 Consolas;}}{\colortbl;??\red0\green0\blue0;\red255\green255\blue255;\red0\green0\blue255;\red43\green145\blue175;}??\fs20     \cf3 public\cf0  \cf3 class\cf0  \cf4 CountyTax\par ??\cf0     \{\par ??        \cf3 public\cf0  CountyTax()\par ??        \{\par ??        \}\par ??\par ??        \cf3 public\cf0  \cf4 County\cf0  County;\par ??        \cf3 public\cf0  \cf3 double\cf0  Amount;\par ??    \}\par ??}
--&gt;
&lt;div style="font-size: 10pt; background: white; color: black; font-family: consolas"&gt;
&lt;p style="margin: 0px"&gt;
&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af"&gt;CountyTax&lt;/span&gt;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
{
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; CountyTax() {}
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: #2b91af"&gt;County&lt;/span&gt; County;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;double&lt;/span&gt; Amount;
&lt;/p&gt;
&lt;p style="margin: 0px"&gt;
}
&lt;/p&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
There is no way out of the box to get a DataGridView to display and edit the CountyTax
object's County and Amount fields. I'd like to have a combo box to display a list
of county names, select one, and then enter an amount. Later, I can calculate the
tax by multiplying the TaxRate for the selected county and the Amount I entered. In
other words, I want to employ good domain design principles. 
&lt;p&gt;
Here are a couple of solutions, depending on whether or not you want to &lt;a href="http://www.developer-corner.com/Resources/KnowledgeBase/tabid/118/articleType/ArticleView/articleId/28/Default.aspx" target="_new"&gt;add
extra code to each grid, and use reflection&lt;/a&gt; or &lt;a href="http://www.codeproject.com/useritems/ObjectBindingSource.asp?msg=2288270" target="_new"&gt;get
some design-time support in a fairly encapsulated solution with faster-than-reflection
performance&lt;/a&gt;. 
&lt;p&gt;
I haven't had a chance to check out Orcas, but I can only hope that Microsoft has
finally seen the light and will treat object-oriented developers to a fully functioning
grid.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.distribucon.com/blog/aggbug.ashx?id=d23c9802-5669-4e57-bf30-eed8afdd7bd0" /&gt;</description>
      <comments>http://www.distribucon.com/blog/CommentView,guid,d23c9802-5669-4e57-bf30-eed8afdd7bd0.aspx</comments>
      <category>.NET</category>
    </item>
  </channel>
</rss>