Files
ersatztv/ErsatzTV.Infrastructure/Data/Configurations/Metadata/ActorConfiguration.cs
T
Jason DoveandGitHub d8d21996b4 add actors to movies and shows (#172)
* add actor metadata

* show actors in ui

* get full movie/show metadata from plex

* store actor thumbnail url

* rework movie detail page

* metadata fixes

* rework show detail page

* rework artist page

* code cleanup
2021-04-17 09:36:57 -05:00

20 lines
564 B
C#

using ErsatzTV.Core.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace ErsatzTV.Infrastructure.Data.Configurations
{
public class ActorConfiguration : IEntityTypeConfiguration<Actor>
{
public void Configure(EntityTypeBuilder<Actor> builder)
{
builder.ToTable("Actor");
builder.HasOne(a => a.Artwork)
.WithOne()
.HasForeignKey<Actor>(a => a.ArtworkId)
.OnDelete(DeleteBehavior.Cascade);
}
}
}