gpt4 book ai didi

c# - 无法将 lambda 表达式转换为类型 'string',因为它不是委托(delegate)类型

转载 作者:IT王子 更新时间:2023-10-29 03:36:00 24 4
gpt4 key购买 nike

<分区>

我正在使用 LINQ lambda 表达式,如下所示:

int Value = 1;
qryContent objContentLine;

using (Entities db = new Entities())
{
objContentLine = (from q in db.qryContents
where q.LineID == Value
orderby q.RowID descending
select q).FirstOrDefault();
}

但是,我收到以下错误:

Cannot convert lambda expression to type 'string' because it is not a delegate type

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com