Thursday, June 2, 2011

ASP.NET MVC Validation with the Entity Framework

Model validation in ASP.NET MVC are very easy and effective, especially if you create the model yourself. It gets a little more complicated when using the entity framework or Linq to SQL, but when know how to do it, it’s a breeze.

If you have read my series on ASP.NET Dynamic Data you’ve almost read the answer in part 3. You have to create a partial class, extending the entity class and define some meta data for the entity.

The tutorial on the ASP.NET MVC web site, Validation with the Data Annotation Validators, explains this in more detail with focus on MVC.

No comments:

Post a Comment