✅ [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](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182026040944627802/image.png)
5 Replies
Business:
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182026200697290803/image.png)
BusinessPromotions
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1182026251184132096/image.png)
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. ❤️