-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Description for navigation property #2367
Comments
Looks similar to #1640 |
It would be better if this was an option in the options GUi window when scaffolding database. |
Got it, but for this it is either T4 or an EF Core change. It is not something I plan to special case in EF Core Power Tools. |
You can modify the T4 template for EntityType like this: var comment = navigation.ForeignKey.Properties.FirstOrDefault()?.GetComment();
if (!string.IsNullOrEmpty(comment))
{
#>
/// <summary>
/// <#= code.XmlComment(comment, indent: 1) #>
/// </summary>
<#
}
var needsNullable = Options.UseNullableReferenceTypes && !(navigation.ForeignKey.IsRequired && navigation.IsOnDependent); (Last line is original) |
Hi,
I use SQL Server where I put comments on foreign keys in database schema.
I noticed that they are scaffolded on the int property.
However there is nothing displayed on the navigation property which is directly related.
Moreover, I thought that adding Description to the FK constraint itself might add description to the navigation property but that did not do anything either.
My feature request then is that if the Description for the foreign key could be shown on navigation property as well?
Why (my own scenario but I believe there are countless uses for this):
So the note would be showing here:
Thank you
The text was updated successfully, but these errors were encountered: