mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-03-25 10:21:11 -04:00
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
18 lines
461 B
C#
18 lines
461 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace DataLayer.Configurations;
|
|
|
|
internal class SeriesConfig : IEntityTypeConfiguration<Series>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Series> entity)
|
|
{
|
|
entity.HasKey(s => s.SeriesId);
|
|
entity.HasIndex(s => s.AudibleSeriesId);
|
|
|
|
entity
|
|
.Metadata
|
|
.FindNavigation(nameof(Series.BooksLink))
|
|
?.SetPropertyAccessMode(PropertyAccessMode.Field);
|
|
}
|
|
} |