none
How do I insert XML documentation comments? RRS feed

  • Question

  • Is there a way to insert XML comments in the auto generated entity classes without them being erased the next time the code is regenerated by Linq to SQL

     

    It would be great if Linq to SQL could read in the description I have in my database table columns and convert them into <summary>  tags for the auto generated class properties.

     

    Is there a way to use inheritance or partial class to accomplish this?

     

    Any help on this would be greatly appreciated.

     

    Wednesday, May 14, 2008 10:22 PM

Answers

  • I did a bit of reflectoring on SqlMetal and I don't think that there is a way to achieve that without losing designer support, as each time you save the generator tool will run and override your changes anyway.

    Thursday, May 22, 2008 9:14 PM

All replies

  • If you use partial classes to extend your entities the XML comments that you put to your partial class in the different file should be picked up.

     

    Other than that everything in designer.cs file is recreated because the tool assoicated to it runs everytime you save the dbml.

    Thursday, May 15, 2008 12:49 AM
  • Yes, but this only works for new class members. I need to comment existing members also.

    Thursday, May 15, 2008 4:05 PM
  • I did a bit of reflectoring on SqlMetal and I don't think that there is a way to achieve that without losing designer support, as each time you save the generator tool will run and override your changes anyway.

    Thursday, May 22, 2008 9:14 PM