library book composite key comments
This commit is contained in:
parent
89207866f3
commit
c337c0b44e
@ -7,6 +7,20 @@ namespace DataLayer.Configurations
|
|||||||
{
|
{
|
||||||
public void Configure(EntityTypeBuilder<LibraryBook> entity)
|
public void Configure(EntityTypeBuilder<LibraryBook> 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.HasKey(b => b.BookId);
|
||||||
|
|
||||||
entity
|
entity
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user