Entity Framework: How to map object's Documentation tags to database?
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.
精彩评论