Skip to content

Commit

Permalink
Use comment property
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Jul 7, 2019
1 parent f336f4a commit b62aae0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ protected virtual EntityTypeBuilder VisitTable([NotNull] ModelBuilder modelBuild

builder.ToTable(table.Name, table.Schema);

if (table.Comment != null)
{
builder.HasComment(table.Comment);
}

VisitColumns(builder, table.Columns);

if (table.PrimaryKey != null)
Expand Down Expand Up @@ -458,6 +463,11 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde
property.HasComputedColumnSql(column.ComputedColumnSql);
}

if (column.Comment != null)
{
property.HasComment(column.Comment);
}

if (!(column.Table.PrimaryKey?.Columns.Contains(column) ?? false))
{
property.IsRequired(!column.IsNullable);
Expand Down

0 comments on commit b62aae0

Please sign in to comment.