Take the 2-minute tour ×

I am writing an MVC application which is using Entity Framework 5 as its ORM. Actually I copied POCO generator classes from existing application, and as the owner of that code said the project is using EF 4 POCO generator classes, I will need to upgrade it to use EF5 POCO generator.

Anyone know how to achieve this?

Sorry for not providing any sourcecode, as I am not sure what I should provide!

can anyone help me by using the information I have provided? thanks

share|improve this question
you probably need to copy T4 templates that generate classes and not classes themselves –  Pawel Mar 3 '13 at 22:34
add comment

1 Answer

up vote 1 down vote accepted

There is no automatic upgrade from EF4 POCO generator to EF5 POCO generator. The generated entity classes will be very similar except some fixup in navigation properties but the problem is the context class which will be completely different with completely different API. Every data access related code using ObjectContext derived context from EF4 POCO generator will have to be rewritten to use DbContext derived context from EF5 POCO context or the IObjectContextAdapter will have to be used to convert DbContext back to ObjectContext.

share|improve this answer
add comment

Your Answer


