Stream custom live channels using your own media
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
560 B

using ErsatzTV.Core.Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace ErsatzTV.Infrastructure.Data.Configurations;
public class MediaSourceConfiguration : IEntityTypeConfiguration<MediaSource>
{
public void Configure(EntityTypeBuilder<MediaSource> builder)
{
builder.ToTable("MediaSource");
builder.HasMany(s => s.Libraries)
.WithOne(l => l.MediaSource)
.HasForeignKey(l => l.MediaSourceId)
.OnDelete(DeleteBehavior.Cascade);
}
}