Alex Rivera | Logout

Entity Framework Validation

Asked 2008-10-10T12:58:57.833
17

I'm getting ready to start a new project and I've been researching the entity framework. My question is what is the best strategy for validating the entities? Other projects I've worked on have used attributes for most of the validation, but obviously this is not possible in the entity framework. Is the only way to do this by handling the partial methods in the property setters? All advice is much appreciated.

Edit
Report

1 Answer

0

If you are using WPF or Windows Forms then you might implement the IDataErrorInfo interface.

The BookLibrary sample application of the WPF Application Framework (WAF) project shows how entities created by the Entity Framework can be validated.

answered 2010-07-28T17:00:47.317

Your Answer