[英]Query Entire Junction Table
Hi there I am using Linq to Entities and I have a junction table (many to many) userroles between users and roles since it is a junction table it is not available in the Ado.net entity model. 嗨,我在使用Linq to Entities,并且在用户和角色之间有一个联结表(很多对很多)用户角色,因为它是一个联结表,在Ado.net实体模型中不可用。
Is there a way to query this table using Linq to entities. 有没有一种方法可以使用Linq查询实体表。 (I need to retrieve all data in my table userroles)
(我需要检索表userroles中的所有数据)
Thanks 谢谢
您可以将ExecuteSqlCommand方法用于此类查询。
context.Database.ExecuteSqlCommand("Your SQL Script");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.