Is there any way to change the Navigation Property name convention when an edmx is generated in Visual Studio 2010 to use the foreign key column name?

后端 未结 2 558
梦毁少年i
梦毁少年i 2021-01-22 16:15

I am currently generating some code from an edmx file with a t4 template by going through all of the properties. By default the edmx file has navigation properties that are nam

2条回答
  •  心在旅途
    2021-01-22 16:30

    Just noticed this question on my right hand bar - I have just posted an answer to what is actually the same question (despite the title) here:

    What T4 file is used to generate an EDMX from database via “Update Model From Database”?

    Esssentially my solution is to prewash the EDMX using a T4 template to fix up these badly named navigation properties.

提交回复
热议问题