mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(dir): ✨ prevent deleting FilterList on attempted delete of Licnese
This commit is contained in:
parent
2312c77117
commit
cff66e4048
1 changed files with 3 additions and 0 deletions
|
|
@ -40,6 +40,9 @@ public virtual void Configure(EntityTypeBuilder<FilterList> builder)
|
|||
.IsUnique();
|
||||
builder.Property(f => f.LicenseId)
|
||||
.HasDefaultValue(5);
|
||||
builder.HasOne(f => f.License)
|
||||
.WithMany(l => l.FilterLists)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasDataJsonFile<FilterList>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue