将XML注释添加到LINQ to SQL设计器生成的类属性中 [英] Add XML Comments to class properties generated by the LINQ to SQL designer

查看:48
本文介绍了将XML注释添加到LINQ to SQL设计器生成的类属性中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio中使用LINQ to SQL设计器来创建数据库的对象模型.现在,我想向每个生成的属性添加XML注释,但是我想不出如何在下次刷新dbml文件时不删除属性的情况下完成此操作.

I used the LINQ to SQL designer in Visual Studio to create an object model of a database. Now, I want to add XML comments to each generated property but I can't figure out how to do it without erasing the properties the next time the dbml file is refreshed.

这怎么办?

推荐答案

我相信无法自动将xml注释与自动生成的代码保持同步.但是,XML注释可以保留在单独的文件中(只需在项目属性"->构建"选项卡上设置"XML文档文件"选项).您可以创建XML文档文件的初始版本,并在必要时手动进行更新

I believe it's not possible to keep xml comments in sync with autogenerated code automatically. However, xml comments can leave in separate file (just set "XML documentation file" option on "Project properties"->"Build" tab). You can create initial version of XML documentation file and update in manually if necessary

这篇关于将XML注释添加到LINQ to SQL设计器生成的类属性中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆