Entity Framework Not Implemented Exception *Solution*

Dec 4, 2012 at 11:26 AM
Edited Dec 4, 2012 at 11:27 AM

If you are getting the Not Implemented Exception on your EF Models, this is what I did to *fix* it:

My solution has a domain project (POCO) with the repositories in there too and a website project.

I was trying to utilize the same POCO models as the models website, adding the [RequiredIfEmpty("field")] anotations right there. bad idea to begin with, I know.

What I ended up doing was creating ViewModels on the website with all the fields as the POCO plus the validation Annotations,  i also added AutoMapper to map the POCO and the ViewModels easily.

By doing this i was able to fully utilize the

MVC Foolproof Validation. not only that but my solution is a lot more decoupled and the domain is a lot lighter.

while this doesn't really solves the Not Implemented Exception, it gives you a work around it.

hope this helps.
Feb 20, 2013 at 2:29 PM
A sample?