我有 2 张桌子。一个是用户表,其中包含用户 ID 和 userSelection(另一个表的外键)都是主键,因此用户有多个行。
第二个表包含其主要 id 为 userSelection 的列。
我想从第二个表中检索 userId 具有的所有 userSelection 行。我也想使用 linq lambda 表达式。
我让它在 sql 中工作 jsut 无法将其转换为在 c# 中使用。
Select * From column
where colID in (
select colId from users
where userID = 'someUser')
谢谢