.NET RIA 服务中的多对多关系 [英] Many-to-many relationship in .NET RIA services
问题描述
我的对象 A 到 B 的数据库中存在多对多关系.当我创建域服务时,元数据看起来不错.A 有 B 的集合,B 有 As 的集合.所以它是正确的.但是生成的 *.g.cs 文件没有相同的关系.
I have a many-to-many relationship in my database of objects A to B. When i create a domain service the metadata looks fine. A has a collections of Bs, B has a collection of As. So it is correct. However the *.g.cs file generated doesn't have the same relationship.
有没有办法让它工作?我在谷歌上搜索了一些答案以实际为关联表生成对象,但我很好奇是否可以避免这种情况.
Is there a way to make it work? I googled some answer to actually generate objects for the association table but i am curious if i can avoid this.
谢谢
推荐答案
在 RIA 服务的当前版本/版本中,您将需要关联表.我们肯定会在未来的版本中对此进行研究.
In the current release/version of RIA Services, you'll need the association table. We will most definitely be looking into this of course for a future release.
也就是说,我认为多对多关系通常有一些与关系相关的有趣数据,因此,中间表通常有实际用途,而不是为了存在而存在.
That said, I think often many-to-many relationships often have some interesting data associated with the relationship and as such, the middle table often has a real use, rather than existing for the sake of existing.
这篇关于.NET RIA 服务中的多对多关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!