Entity Framework Core - Configure Two Foreign Keys to the Same Table

preview_player
Показать описание

In this video we'll use the Fluent API to configure two foreign keys to the same table in Entity Framework Core.
Рекомендации по теме
Комментарии
Автор

Just exactly what I was looking for. Thank you!

navzme
Автор

Saved me from reverse engineering stack overflow answers, thanks a lot man

typete-ke
Автор

sql cardinality is always 0, 1 or Many. Having a Table with Sender/Reciever needs a many to many relation. On your junction table you can have 2 columsn IsSender and IsReciever :-)

bastienneyer
Автор

How do I get both SentMessages and ReceivedMessages on the same request?

oluwatosinaboluwarin
Автор

Great Video. I just after something around two keys in a one to many, or can this not be done in EF. That is the Many tables must have say the ID and GUID values stored in the One Table, if not a match then don't allow add.

waynehawkins
Автор

my boss is gonna assume me thanks to u. i'm going to buy a BMW for u too ;))

mimmonovas
Автор

This does not work with ms sql. It does not let you delete data from Users.

ozerunal