OK, so I still want to use the schema model from EF 4.0, but I also want the API and flexibility of EF 4.1.
So, in my application, I added DbContext generation code from my current EF 4.0 models.
Now, my questions is what are my options for validating my DbSet (EF 4.1) models without them getting wiped out?
DataAnnotation doesn't seem to cut it because everytime I update my visual model, it COMPLETE WIPES out all my modifications.
- I have heard about partial classes, but that seems to be really messy.
- I don't really want to do validations on my controller.
- I want to make this scalable so I can easily transfer my classes from asp.net MVC to WPF and etc.
Is there a way to do this? Validation repository? Seperate validation layer? Validation inside the repository layers? Examples would be appreciated too.
Please help me. Thanks :)