KEMBAR78
Reverse Engineering generates not needed code · Issue #23473 · dotnet/efcore · GitHub
Skip to content

Reverse Engineering generates not needed code #23473

@Saibamen

Description

@Saibamen

.NET CLI Tools: 5.0.0

Generated code:

entity.Property(e => e.ChangedDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("('2014-07-22T10:34:48.440Z')")
                    .HasAnnotation("Relational:ColumnType", "datetime");

Should be:

entity.Property(e => e.ChangedDate)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("('2014-07-22T10:34:48.440Z')"));

Generated code:

entity.Property(e => e.OperationArt)
                    .IsRequired()
                    .HasMaxLength(1)
                    .IsFixedLength(true);

Should be (default parameter value for IsFixedLength() is true):

entity.Property(e => e.OperationArt)
                    .IsRequired()
                    .HasMaxLength(1)
                    .IsFixedLength();

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions