[英]I need help to Convert a SQL Statement to C# LINQ
I need help with Converting this Select statement in LINQ C#
Code我需要帮助在
LINQ C#
代码中转换此 Select 语句
SELECT TagName
from Tags
Where TagId IN(
SELECT TagId
from PresentationTags
Where PresentationId = 2
)
Where()
with nested Any()
should do the job带有嵌套
Any()
的Where()
) 应该可以完成这项工作
context.Tags.Where(
x => context.PresentationTags.Any(
y => y.PresentationId == 2 && x.TagId == y.TagId
)
).Select(x => x.TagName);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.