I use the DataBase First approach. There are three tables in the database where hospital admission information is stored: Visit (patient admission information, including admission id), Analysis (id and name of a specific type of analysis) and Visit_Analysis (admission id is compared and analysis id to determine what tests were assigned at what receptions).
When creating a model from a database, it produces two tables, Visit and Analysis, and the Visit_Analysis table is made in the form of an association with the name Visit_Analysis.
The question is, is it possible from the program code to perform a query in the database using EntityFramework to add records or read from the Visit_Analysis table? because There is no Visit_Analysis entity in the DbContext class.
class Vist { ... List<Analysis> analysises ... }and / orclass Analysis { ... Visit visit ... }And this is enough. Visit_Analysis is processed by the framework instead of you. - Sergey