Several quirks may pop up – the project may not work seamlessly in your local environment. Entity Framework generates a slew of files – most notably its mapping file (with an edmx extension) – which captures a snapshot of the underlying database.

First,  I got the commonly encountered multiple web.configs error (Error 3)

Error 3 It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Workaround – For some reason, web.config gets copied into subfolders – Find and delete all subfolders web.configs.

Next, I encountered  EF mapping errors – Mapping of CLR type to EDM type is ambiguous

Workaround – Make sure you update nuget packages (get EF framework) and regenerate the EDMX  .

On compilation, I encountered : Type or namespace objects could not be found

Workaround – Make sure you add a reference to System.data.entity.

Summary

Am sure I am missing a list of other common errors encountered in starting out with an existing EF codebase, but these are the ones I ran into.

Anuj holds professional certifications in Google Cloud, AWS as well as certifications in Docker and App Performance Tools such as New Relic. He specializes in Cloud Security, Data Encryption and Container Technologies.

Initial Consultation

Anuj Varma – who has written posts on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.