Hello. There was a problem with the use of the Entity Framework Code First: everything was fine, everything was normally written to the database. The problem manifests itself when sampling some objects.

In short: there are classes A and B, which are connected by class C (there are many to many connections; that is, there are two fields of class A and one class B in class C). The primary keys of each class are guids.

When I need to select instances of class A associated with some instance of class B and I look at table C and form the strings through which I will drag instances of class A, all information is pulled out of the database except references to instances of class A.

  • show the code - Specter
  • I myself have solved this problem, though a little crooked, but it works. And about the code, the morning one has already been erased :( - Indenk

1 answer 1

select * from A, B, C where A.id = 17 and C.A_id = A.id and B.id = C.B_id; 

I write in the old fashioned way without JOIN.

  • not the best way - Specter