The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Valeriy (1) [Avatar] Offline
2.1.1, figure 2.1.
A better way to imlement 1-to-1 relationship is to remove PriceOfferId column from the table PriceOffers, remove unique index for BookId column and make BookId a primary key in addition to foreign key (this will add a unique constraint).
As a result, the table PriceOffers will have 1 column less and 1 unique index less.
Jon P Smith (40) [Avatar] Offline
Hi Valeriy,

You are right, and that is exactly what I did at the start as its must more efficent, but it turn out there is a subtle bug in EF Core (see I mention it on page 185 in figure 7.5, and on the top of page 187. The issue may be looked at in the version 2 release.

PS. Hope you are finding the book useful.