RE: Association missing in dbml generated classes
- From: jialge@xxxxxxxxxxxxxxxxxxxx ("Jialiang Ge [MSFT]")
- Date: Wed, 28 Jan 2009 04:17:25 GMT
Hello Jakob
Thank you for the project, from which I notice that you are building a many
to many relationship between Person and Role. The problem results from the
current status of LINQ - SQL that "many to many" relationships are not well
supported. This means that there is no specific relation attribute that
allows defining such a relation. The product group is in progress to
improve it. What we have to do currently is to create as many entities as
the physical model does and define your intermediate table on the code
side. Please refer to these two articles for an example:
How to implement a many-to-many relationship using Linq to Sql ?
http://blogs.msdn.com/mitsu/archive/2007/06/21/how-to-implement-a-many-to-ma
ny-relationship-using-linq-to-sql.aspx
(if the long URL is broken by the newsgroup system, please concat it
manually)
Create many-to-many relationships in LINQ for SQL
http://www.codeproject.com/KB/database/LINQ_many2many.aspx
If you have any difficulties when trying the solution, please feel free to
tell me.
Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
.
- Follow-Ups:
- RE: Association missing in dbml generated classes
- From: Jakob Lithner
- RE: Association missing in dbml generated classes
- References:
- Association missing in dbml generated classes
- From: Jakob Lithner
- RE: Association missing in dbml generated classes
- From: "Jialiang Ge [MSFT]"
- RE: Association missing in dbml generated classes
- From: Jakob Lithner
- Association missing in dbml generated classes
- Prev by Date: Passable ORDER BY value
- Next by Date: Re: Passable ORDER BY value
- Previous by thread: RE: Association missing in dbml generated classes
- Next by thread: RE: Association missing in dbml generated classes
- Index(es):
Relevant Pages
|