Продолжение
This commit is contained in:
@@ -9,6 +9,7 @@ using Pf2eModel.Model.Common;
|
||||
using Pf2eModel.Model.Enum;
|
||||
using Pf2eModel.Model.Structure;
|
||||
using Pf2eModel.Model.Structure.AncestryRelation;
|
||||
using Pf2eModel.Model.Structure.ArchetypeRelation;
|
||||
using Pf2eModel.Model.Structure.BackgroundRelation;
|
||||
using Pf2eModel.Model.Structure.ClassRelation;
|
||||
using Pf2eModel.Model.Structure.DeityRelation;
|
||||
@@ -179,9 +180,11 @@ public partial class Pf2eDbContext
|
||||
.HasForeignKey<Archetype>(a => a.DedicationFeatId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
entity.HasMany(a => a.Feats).WithOne(f => f.Archetype)
|
||||
.HasForeignKey(f => f.ArchetypeId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
entity.HasMany(a => a.Feats).WithMany(f => f.Archetypes)
|
||||
.UsingEntity<ArchetypeFeats>(
|
||||
l => l.HasOne<Feat>().WithMany().HasForeignKey(af => af.FeatId),
|
||||
r => r.HasOne<Archetype>().WithMany().HasForeignKey(af => af.ArchetypeId)
|
||||
);
|
||||
});
|
||||
|
||||
// Background
|
||||
|
||||
Reference in New Issue
Block a user