✅ [EF Core] Why does my database entity have a one-directional FK Connection?
Business entity:
BusinessPromotion BusinessPromotion { get; set; }
BusinessPromotion entity:
public Business Business { get; set; }

5 Replies
Business:

BusinessPromotions

Please @ on reply
It looks like a column hasn't been defined for the FK. Look at definition for VisitsEachMonths or BusinessImages, it looks like they use BusinessId too, or post a screenshot of one of them here.
See in the Business screenshot you have
OwnerId nvarchar(450) constraint FK_busi...... references AspNetUsers
, there should be similar for BusinessPromotions. You should see that in VisitsEachMonths
or BusinessImages
definition.Thank you for the reply. The problem has been resolved. ❤️