L
L
LiptonOlolo2018-05-21 22:18:19
MySQL
LiptonOlolo, 2018-05-21 22:18:19

How to create "friends" table in MySQL and make models in EF6?

Greetings.
The question has come up: how to make a table of friends in mysql correctly and, of course, how to make models in the Entity Framework.
While there is such a solution, which, I do not know why, does not work:
a2XV7B3s1qM4wr.pngDr8KoJ6U4wjMnA.pngKAgKE68U4QjK9A.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2018-05-21
@LiptonOlolo

First, why do you need the Id field in DBContact? It is not needed there.
Secondly, the difference between Contacts and Contacts1 is not clear, you need to name the fields more clearly.
Thirdly, the tables are linked in the file where the DbContext is defined, there may be an error in it.
Do you have code first?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question