Sunday, May 15, 2011

MVC 3, Razor, and Entity Framework Code-First

Here is a good tutorial (and downloadable PDF) on using MVC 3, Razor, and the EF Code-First (Code-First CPT 5 Release).

Visit Tutorial

I think the best part about the tutorial is how Code-First makes it really simple to set up pure POCO objects for data access.

Friday, January 21, 2011

Visual Studio 2010 Find/Replace Dialog Growing

For anyone interested in fixing their ever growing find dialog in Visual Studio 2010, there’s now a patch from Microsoft:

Download Growing Find and Replace Dialog

Saturday, January 1, 2011

Use ApplicationException when creating your own custom exceptions

In March of 2009 I talked about Catch (Exception e): Right or wrong?. Since that time I've gotten into the habit of also deriving my custom application exceptions from the .NET ApplicationException rather than just Exception. This .NET class serves to help identify exceptions that are specific to an application, hence the name.

To make things really easy for us to create application-specific exceptions, use the Visual Studio 2010 code snippet, "exception". Be sure to use the tab key to update the base class to ApplicationException. The snippet contains all the code to adhere to the exception derivation best practices.

Very handy!

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...