开发者

Generating Entity Classes using edmgen

I have a edmx file created using the entity entity framework model.

Whenever I make some changes in the edmx(Like removing a column from the entity), I would like to generate the entity classes(Designer.cs). I know I can do this by right clicking the edmx file and Run custom tool

I wanted 开发者_如何学Goto do this using edmgen tool. But the edmgen tool needs the msdl and csdl files. But I have all the contents in the edmx file.

Is there any way to specify the edmx file to the edmgen command.


If you have configured everything correctly .Designer.cs file should be generated automatically without using Run custom tool. EDMX is just file for Visual Studio - you must use MSL, CSDL and SSDL for EdmGen. You can set up your EDMX to generate SSDL, MSL and CSDL files for you but in such case you will also have to use these files in deployment and connection string instead of resources used by default. To set up this change Metadata Artifacts Processing from Embed in Output Assembly to Copy to Output Directory.

You can also check EdmGen2 which should be able to opeerate with EDMX directly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜