O'Reilly logo

NHibernate 3 Beginner's Guide by Gabriel N. Schenker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – Using property validation

In this example, we want to implement a simple domain that is validated using attributes to decorate the properties of our entities. We will use NuGet to set up our project and have a quick start.

  1. Open Microsoft SQL Server Management Studio (SSMS) and log in to your local SQL Server Express. Create a new empty database called BasicValidationSample.
  2. Open Visual Studio and add a new Console Application type project. Call the project BasicValidationSample.
  3. Set Target framework of the project as .NET Framework 4.0.
  4. Make sure you have the latest NuGet Package Manager extension installed. At the time of writing, this is version 1.2.x.

    Tip

    Installing NuGet Package Manager Extension

    To be able to use NuGet from within ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required