Author: ScottGu's Blog | Posted on: 12/10/2010 4:05:45 AM | Views : 1062

Earlier this week the data team released the CTP5 build of the new Entity Framework Code-First library.  In my blog post a few days ago I talked about a few of the improvements introduced with the new CTP5 build.  Automatic support for enforcing DataAnnotation validation attributes on models was one of the improvements I discussed.  It provides a pretty easy way to enable property-level validation logic within your model layer. You can apply validation attributes like [Required], [Range], and [RegularExpression] - all of which are built-into .NET 4 - to your model classes in order to enforce that the model properties are valid before they are persisted to a database.  You can also create your own custom validation attributes...(read more) ...

Go to the complete details ...