RE: Association missing in dbml generated classes



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.
=================================================

.



Relevant Pages

  • =?ISO-8859-1?Q?Extending_Entity_Framework_=A0and_LINQ_to_SQL_Support?= =?ISO-8859-1?
    ... Entity Framework support, LINQ to SQL support, and contain an ORM ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Extending SQL LINQ Table Class
    ... There are a series of LINQ to SQL articles on ScottGu's blog. ... Microsoft MSDN Online Support Lead ... Extending SQL LINQ Table Class ...
    (microsoft.public.dotnet.framework)
  • Re: TRASICTIONAL PUBBLICATION ERROR 37000
    ... SQL Profiler is a monitor tool for SQL Server. ... from Enterprise Manager: on the Tools menu, ... Microsoft Customer Support Services via telephone so that a dedicated ...
    (microsoft.public.sqlserver.replication)
  • RE: SQLCMD fails with login timeout expired.
    ... I understand tht you could connect to SQL Express properly by 2005 ... management tool but you cannot connect it via sqlcmd. ... In Configuration manager, please make sure TCPIP and named pipes ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.tools)
  • RE: EF or LINQtoSQL and VarBinary Max?
    ... Gregory is correct that in LINQ to SQL, ... System.Data.Linq.Binary or byte, while in LINQ to Entities, it is ... MyImageTable myImage = new MyImageTable ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.adonet)

Quantcast