Reputation: 354
Is there any method to add intellisense to designer-generated classes and properties in LINQ to SQL? I Want to add this comments to show documentation what class or property mean in project.
I have created New LINQ to SQL Classes in Visual Studio and mapped by Server Explorer a sample table. If i do query such as:
var items = from s in db.SampleTable select s;
When I type db + dot = nothing useful shows...
The same problem occurs when I do code like this:
foreach(var item in items)
{
Console.WriteLine(item.ID);
}
When I type item + dot = also nothing useful shows...
Is there any method to add Intellisense to to this ? We could add Comments/XML to *.designer.cs class - but if I regenerate code - It will clear all comments...
Any help for making it work would be very appreciated.
EDIT: Sorry, but to be more specific - I have in mind missing XML documentation...
Upvotes: 1
Views: 347
Reputation: 156624
Those classes all have intellisense: that's what makes the SampleTable
show up in a list when you type db.
.
What you're asking about is XML documentation. If you are using an EDMX to generate the entity context, you should be able to right-click an Entity type or Property, go to Properties, and there will be a field where you can enter descriptive information which will cause XML comments to be generated on the class or property.
Oh, right, LINQ to SQL. Try following the instructions here to create a separate XML comments mapping file.
Upvotes: 1