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 553
梦毁少年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.

    0 讨论(0)
  • 2021-01-22 16:45

    No it is not possible to change convention for naming navigation properties.

    Thanks @Arkiliknam for comment. Someone else found a way to do that: Improve navigation property names when reverse engineering a database

    0 讨论(0)
提交回复
热议问题