Skip to main content
 首页 » 编程设计

c#之将带有子查询的sql查询转换为linq语句

2024年02月20日20arxive

<分区>

Possible Duplicate:
how to do subquery in LINQ

我有一个 SQL Server 2008 查询:

select  
    account_hcc_id, account_name  
from  
    [ACCOUNT_HISTORY_FACT]  
where  
     TOP_ACCOUNT_KEY = (select TOP 1 TOP_ACCOUNT_KEY  
                        from ACCOUNT_HISTORY_FACT  
                        where account_hcc_id = '3362')  
     and ACCOUNT_LEVEL = 1; 

我需要将其转换为 C# linq 语句。请让我知道我该怎么做。