mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-03-25 02:13:27 -04:00
Make fields readonly Remove unnecessary casts Format document Remove unnecessary usings Sort usings Use file-level namespaces Order modifiers
19 lines
472 B
C#
19 lines
472 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace DataLayer.Configurations;
|
|
|
|
internal class CategoryConfig : IEntityTypeConfiguration<Category>
|
|
{
|
|
public void Configure(EntityTypeBuilder<Category> entity)
|
|
{
|
|
entity.HasKey(c => c.CategoryId);
|
|
entity.HasIndex(c => c.AudibleCategoryId);
|
|
|
|
entity.Ignore(c => c.CategoryLadders);
|
|
|
|
entity
|
|
.HasMany(e => e._categoryLadders)
|
|
.WithMany(e => e._categories);
|
|
}
|
|
} |