我有以下查询,我想在 Linq 中写这个(使用 c#)。我该怎么做?
declare @parentId bigint
set @parentId = (select ArticlePart from tbl_Article where ArticleID = 70001)
declare @ids varchar(100)
set @ids=''
while @parentId is not null
begin
set @ids = @ids +CAST( @parentId as varchar(50))+','
set @parentId = (select ArticlePart from tbl_Article where ArticleID = @parentId)
end