I'm not interested in answers concerning client side validation or model binding. Really, this question could apply to any data access class library outside of MVC, but the issues are similar, I think.
I'm using the Repository pattern currently for data access with my entities (models). Currently the repositories handle all of the CRUD operations, but I think I'd like for my models to be responsible for saving themselves in order to do validation. How should I handle this?
I could add a IsValid method in my models that the repositories could call that could then run all of my business logic before the repository saves the model, but then nothing FORCES the repositories to call this validation logic, right?
If I want the models to have a Save method, then what's the proper way for them to save themselves? They shouldn't call back up to the Repository should they?
Any thoughts on how I should handle this?
Thanks!