问题
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.
How can this be done?
回答1:
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
回答2:
This tool can do it: http://www.huagati.com/dbmltools/
来源:https://stackoverflow.com/questions/37519/add-xml-comments-to-class-properties-generated-by-the-linq-to-sql-designer