更新时间:2023-02-17 19:16:29
请原谅我的VB语法中的任何错误,我是(主要是)C#程序员.
Please excuse any errors in my VB syntax, I'm a (mostly) C# programmer.
Dim item = db.dch.Where( Func(d) d.ID == 99 ) _
.OrderByDescending( Func(d) d.EffectiveDate )_
.Take(1)
它实际上将实现为
select top 1 <...columns...>
from dch
where ID == 99
order by EffectiveDate desc
我认为这等同于您的查询.
which I think is equivalent to your query.