Linking Linq to SQL Between Many To Many Without A Third Class

My database has the following tables:

  • Customers (ID)
  • Orders (ID)
  • CustomerOrders (CustomerID, OrderID)

How to map the Customers table to the Customers class and the Orders table to the Orders class without creating the CustomersOrders class?

+3
source share
1 answer

It depends on the version of LINQ you are talking about.

If you are using Entity Framework 4.0 and you do not have additional information in the table other than identifiers, then what you request should already be generated. I believe the same is true for Entity Framework 1.0.

LINQ to SQL - . " ". LINQ to SQL , , . , . , , :

"--" Linq to SQL

+5

Source: https://habr.com/ru/post/1794155/


All Articles