C
C#12mo ago
Lounder

✅ [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; }
No description
5 Replies
Lounder
LounderOP12mo ago
Business:
No description
Lounder
LounderOP12mo ago
BusinessPromotions
No description
Lounder
LounderOP12mo ago
Please @ on reply
Stringy
Stringy12mo ago
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.
Lounder
LounderOP12mo ago
Thank you for the reply. The problem has been resolved. ❤️
Want results from more Discord servers?
Add your server