我有一个拥有“许多”关系的数据库。 我与Mlambda和linq一起试图把一个进入许多到许多桌子。
I have one Ado-entity called Book
and another called Author
.
Book contains the navigation property Authors
and Author
contains the property Books
.
现在,我想从我的行文中删除一本书。 为了做到这一点,我不得不在<代码>AuthorBooks-table>上删除其外在钥匙,但事实证明这很困难。
这是当时我的辛勤:
var a = db.db.Authors.Select(c => db.db.Authors.Where(c.Books.Contains(book));
This is not accepted by Visual studio and I don t know how to get to where I want. Thanks in advance!
我错误的照片:
http://olofd.dyndns.org:8887/pic1.PNG
http://olofd.dyndns.org:8887/pic2.PNG