Possible Duplicate:
Entity Framework Validation
Is there any good and flexible validation framework for EntityFramework ?
Possible Duplicate:
Entity Framework Validation
Is there any good and flexible validation framework for EntityFramework ?
Entity Framework provides a great variety of validation features that can feed through to a user interface for client-side validation or be used for server-side validation.
When using code first, you can specify validations using Data annotation or fluent API configurations.
Additional and more complex validations can be specified in code and will work whether your model hails from code first, model first or database first.
Here are some links for more details: Configuring Properties and Types with the Fluent API and Entity Framework Validation.
You could look at Fluent validation framework. It is not EF specific but means you can use it on viewmodels as well.
You can also look at foolproof validation it does client side validation for things like one property being required if another is true etc. E.g if married checkbox is checked you must add maiden name
Also look for data annotation extensions on nuget it extends what EF offers