diff --git a/DataLayer/Configurations/LibraryBookConfig.cs b/DataLayer/Configurations/LibraryBookConfig.cs index b66f5ea6..5f1e3736 100644 --- a/DataLayer/Configurations/LibraryBookConfig.cs +++ b/DataLayer/Configurations/LibraryBookConfig.cs @@ -7,6 +7,20 @@ namespace DataLayer.Configurations { public void Configure(EntityTypeBuilder entity) { + // to allow same book (incl region) with diff acct.s: + // + // this file: + // - composite key: + // entity.HasKey(b => new { b.BookId, b.Account }); + // entity.HasIndex(b => b.BookId); + // entity.HasIndex(b => b.Account); + // - change the below relationship since Book+LibraryBook would no longer be 1:1 + // + // other files: + // - change Book class since Book+LibraryBook would no longer be 1:1 + // - update LibraryBook import code + // - would likely challenge assumptions throughout Libation which have been true up until now + entity.HasKey(b => b.BookId); entity