Hi,
I have solution in Visual Studio 2010 and Entity Framework 4. Problem is old but still none of the answers I have found really worked for me.
Solution have metadata classes that extends models in database and existing edmx with 3 standard files for EF 4 (csdl,msl,ssdl).
When I do the "Update Model from database" option, classes, db sets are created just fine but in runtime it breaks and throws an error that entity I was modify or create in database is not part of the current context.
Problem is that metadata files are not refreshed so they have proper mappings that reflects the database changes.
Running custom tool, transform T4 templates and generating classes using Code Generation option failed for me.
So please can someone show me the exact steps that are needed to simply add or modify database, refresh changes and use modifications without having to write manually mappings in XML :)
Thanks
What I have tried:
- Refreshing model from database
- Generating code for db context
- Running custom tools for templates
- Transforming T4 options