MetadataException: Unable to load the specified metadata resource

This means that the application is unable to load the EDMX. There are several things which can cause this. You might have changed the MetadataArtifactProcessing property of the model to Copy to Output Directory. The connection string could be wrong. I know you say you haven’t changed it, but if you have changed other things … Read more

How do I view the SQL generated by the Entity Framework?

For those using Entity Framework 6 and up, if you want to view the output SQL in Visual Studio (like I did) you have to use the new logging/interception functionality. Adding the following line will spit out the generated SQL (along with additional execution-related details) in the Visual Studio output panel: using (MyDatabaseEntities context = … Read more