mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
544 B
18 lines
544 B
using ErsatzTV.Core.Domain; |
|
using Microsoft.EntityFrameworkCore; |
|
using Microsoft.EntityFrameworkCore.Metadata.Builders; |
|
|
|
namespace ErsatzTV.Infrastructure.Data.Configurations; |
|
|
|
public class TraktListConfiguration : IEntityTypeConfiguration<TraktList> |
|
{ |
|
public void Configure(EntityTypeBuilder<TraktList> builder) |
|
{ |
|
builder.ToTable("TraktList"); |
|
|
|
builder.HasMany(l => l.Items) |
|
.WithOne(i => i.TraktList) |
|
.HasForeignKey(i => i.TraktListId) |
|
.OnDelete(DeleteBehavior.Cascade); |
|
} |
|
}
|
|
|