I have an old database (with terribly named tables and columns) and an entity framework data model where I have mapped the table and column names from the database to sensible names.
When running the DBContext generator on the model the context is created with the names from the model but the column and table mappings are not preserved. Is it possible to auto-generate these mappings?
I realise it can be done manually in the OnModelCreating method like this.
If you are using EDMX file your generated context will not contain the mapping. EDMX file is the mapping and when you compile the application this file is decomposed into three resources used for mapping at runtime.