fix: use EnumToStringConverter for Visibility fields

This commit is contained in:
Oliver Booth 2024-02-23 17:57:08 +00:00
parent bd1e9dac1f
commit 817019ad16
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
2 changed files with 2 additions and 0 deletions

View File

@ -23,5 +23,6 @@ internal sealed class TutorialArticleConfiguration : IEntityTypeConfiguration<Tu
builder.Property(e => e.PreviewImageUrl).HasConversion<UriToStringConverter>();
builder.Property(e => e.NextPart);
builder.Property(e => e.PreviousPart);
builder.Property(e => e.Visibility).HasConversion<EnumToStringConverter<Visibility>>();
}
}

View File

@ -19,5 +19,6 @@ internal sealed class TutorialFolderConfiguration : IEntityTypeConfiguration<Tut
builder.Property(e => e.Slug).HasMaxLength(50).IsRequired();
builder.Property(e => e.Title).HasMaxLength(255).IsRequired();
builder.Property(e => e.PreviewImageUrl).HasConversion<UriToStringConverter>();
builder.Property(e => e.Visibility).HasConversion<EnumToStringConverter<Visibility>>();
}
}