dotnet / dotnet/efcore

Add comments to the DbSet and Navigation in the T4 template

Open
#29,710 1 comment 0 reactions 0 assignees View on GitHub
customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

https://github.com/dotnet/efcore/blob/315be6c768412f5e236e1cf1b0ffb1412de45e8e/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.tt#L62-L65

https://github.com/dotnet/efcore/blob/315be6c768412f5e236e1cf1b0ffb1412de45e8e/src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.tt#L127

https://github.com/dotnet/efcore/blob/315be6c768412f5e236e1cf1b0ffb1412de45e8e/src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.tt#L154

```
<#
foreach (var entityType in Model.GetEntityTypes().Where(e => !e.IsSimpleManyToManyJoinEntityType()))
{

if (!string.IsNullOrEmpty(entityType.GetComment()))
{
#>
///
/// <#= code.XmlComment(entityType.GetComment()) #>
///
<#
}
#>
public virtual DbSet<<#= entityType.Name #>> <#= entityType.GetDbSetName() #> { get; set; }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.