Linq到Sql和Mapping表 [英] Linq to Sql and Mapping tables
本文介绍了Linq到Sql和Mapping表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个名为AlbumSongs的表,它由一个AlbumID和一个SongID组成。此表的目的是将歌曲与特定专辑相关联。有两个单独的表,名为Albums和Songs,包含值。我会将AlbumSongs映射表拖到设计器表面吗?我不明白Linq to Sql如何处理这种情况以及我将如何编程。任何意见?谢谢。
I have a table called AlbumSongs that consists of an AlbumID and a SongID. The purpose of this table is to associate a song to a particular album. There are two separate tables called Albums and Songs that contain the values. Would I drag the AlbumSongs mapping table onto the designer surface? I don't understand how Linq to Sql would handle this situation and how I would program against it. Any opinions? Thanks.
推荐答案
你好,
在LINQ中有很多很多的关系是星期五晚上的一个大话题...
虽然这篇文章现在有点陈旧,但它仍然会有所帮助: http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx
<祝你好运。
小组
Hello,
Many to many relationship in LINQ is a big topic for a friday evening...
Although this article is a bit old now, it will still help: http://weblogs.asp.net/scottgu/archive/2007/05/19/using-linq-to-sql-part-1.aspx
Good Luck.
LS
这篇关于Linq到Sql和Mapping表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文