Ryan Rivest

  Home :: Contact :: Syndication  :: Login
  8 Posts :: 0 Stories :: 0 Comments :: 0 Trackbacks

Archives

Post Categories

Tips

Tips

There are quite a few examples of using the attributes from System.ComponentModel.DataAnnotations out there in your ASP.NET MVC applications.  If you haven’t been keeping up with what’s new in ASP.NET MVC 2, one of the biggest improvements is in the area of validation – which is now automatic if you decorate your models with the attributes.  I recommend you check out ScottGu’s latest epic post on the topic to get up to speed. Continuing with the Gu’s example, here is our Person class and the applied validation attributes: public class Person { ...


This tip applies to Visual Studio 2008 and Windows Installer (Setup) Projects.  They’re used to create *.msi installers for deploying applications. I was having some weird issues with my setup project.  When I tested the installer against the previous version of the installer, it would run fine without reporting any errors, but when I launched my application, the changes I made weren’t showing up.  Odd, I thought.  I figured the installer wasn’t working properly.  What I was expecting was an uninstall to show up before the install ran.  This is actually the behavior in Visual Studio 2005...


Being fairly new to unit testing, I find myself discovering all kinds of interesting challenges when trying to test my data access layer (DAL).  I had decided early on in one of my projects (with the tutelage of my supervisor and mentor) to take on the task of writing my DAL from scratch.  Disclaimer:  I realize that data access is a problem that has already been solved (many times over), this was more of a learning exercise for me. Part of my DAL deals with the IDbCommand.CreateParameter() method.  I ran into a problem where I wanted each...