Add EF 6.x EntityObject Generator in Visual Studio 2017

核能气质少年 提交于 2019-12-06 10:49:08

I just did this in VS2017.

Download the VS extension package "EF 6.x EntityObject Generator for C#" from MS. It's a *.VSIX file. Rename it to ZIP. open the zip file and inside that you find one more zip. There you will see a TT file. Copy it out.

In your project that have a MyModel.TT file that generates DbSet just replace that TT file with the one you got from vsix file.

Edit one line:

    SourceCsdlPath = @"$edmxInputFile$",

to your

    SourceCsdlPath = @"myEDM.emdx",

save TT file and your c# model code is generated with old EntityObjects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!