开发者

Entity Framework: How to map object's Documentation tags to database?

开发者 https://www.devze.com 2023-03-18 18:15 出处:网络
I need to generate script with description for each table and field. Filling Doc开发者_开发问答umentation tags puts comments to Objects, but not into the script.

I need to generate script with description for each table and field. Filling Doc开发者_开发问答umentation tags puts comments to Objects, but not into the script. Is it possible to generate automaticly something like this:

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Field description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SampleTable', @level2type=N'COLUMN',@level2name=N'SampleTableFieldName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Description' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SampleTable'
GO


You could write a program that opens the edmx file as an xml document.

Then loop through the document outputing the commands to a text file.

0

精彩评论

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