如何使Entity数据模型设计器使用我的数据库列描述

如何使Entity数据模型设计器使用我的数据库列描述

本文介绍了如何使Entity数据模型设计器使用我的数据库列描述?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中使用EF4。我已经创建了一个SQL数据库,并且我的所有列都记录在SQL管理工作室中的Description属性中。当我在Visual Studio中创建edmx时,如何让它读取这些描述,并使用它们来为生成的类添加注释?我知道我可以在edmx属性中使用Summary和LongDescription,但我正在寻找一种方法,而无需复制和粘贴每个描述。



谢谢!

解决方案

有一个功能要求。随时添加您的投票,以帮助将来可以使用此选项:



Huagati有一些伟大的工具用于EF和L2S。其中一个功能是根据SQL数据库更新EF文档:

似乎他们在数据库中查找这些字段,然后更新模型XML直接。可能有人可以创建一个VS加载项,如果这是您想要的唯一功能,那么它将不会有价格。我会将其添加到我的未来项目列表中(尽管我似乎从来没有找到时间)。



希望帮助!


I am using EF4 with Visual Studio 2010. I have a SQL database already created and all my columns are documented with the Description property in SQL management studio. When I create the edmx in Visual Studio, how can I make it read those descriptions and use them to add comments to my generated classes? I know I can use the Summary and LongDescription in the edmx properties but I'm looking for a way to do this without having to copy and paste every description.

Thanks!

解决方案

There is a feature request for this. Feel free to add your votes to help make this available in the future:Retrieve the SQL Descriptions in Entity-Framework feature request

Huagati has some great tools for working with EF and L2S. One of the features is updating the EF documentation based on the SQL database:Huagati website

It seems they look for these fields in the database and then update the model XML directly. Probably someone could create a VS Add-In that would do the same without the price if this is the only feature you wanted. I'll add this to my list of "future" projects (though I never seem to find time for these!).

Hope that helps!

这篇关于如何使Entity数据模型设计器使用我的数据库列描述?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 19:48