Trying to set the title attribute of an html element as the parameter passed to the entity.Property().HasComment(comment) method.
I've tried with no luck:
<label asp-for="OrganizationTypeId" title="@ViewData.ModelMetadata.Description">
The value is null while the OnModelCreating method is setting the following:
modelBuilder.Entity<Organization>(entity =>
{
entity.Property(e => e.OrganizationTypeId).HasComment("Foreign key of the Org...");
Is this comment available to be used as an html attribute?
Thanks
这个 DbContext 扩展方法展示了如何检索模型的注释。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.