Monday, March 12, 2018

Entity Framework: Model successfully updated but changes are not available in code

I lost quite some time on this annoying issue that sometimes affects my VisualStudio 2015 with the Devart Oracle Driver for using Entity Framework.

My changes in the database (for example a modification of a view) were reflected ONLY in the entity framework model (after selecting the usual Update Model from Database...) but the modified classes WERE NOT available in the code!

The solution is very simple: "Run Custom Tool"

Select your model file (the one with extension with .edml), right click an choose "Run Custom Tool".

Now the changes to your database are available in your code too.

Source:

https://blog.jongallant.com/2012/08/entity-framework-manual-update/