c# - Linq to SQL many-to-many relationship without a third class -
in database have following tables:
- customers (id)
- orders (id)
- customersorders (customerid, orderid)
how map customers table customers class , orders table orders class without creating class customersorders?
that depends on linq version you're talking about.
if you're using entity framework 4.0 , have no additional information in table other ids asking should generated. believe same true entity framework 1.0.
linq sql story. never handled many-to-many relationships well. have allow linq sql generate third table , extend partial classes hand in separate file mask away third table. it's ugly works. here's series of blog posts detail needs done:
Comments
Post a Comment