我想展示UpdateDevice一个特定的最新价值DeviceId.使用OrderByDescending和编写LinQ查询时Where,我收到错误
无法执行文本选择:CS1061'int'不包含'OrderByDescending'的定义,并且没有可以找到接受类型'int'的第一个参数的扩展方法'OrderByDescending'
数据类型
Id - int32
UpdatedDate- datetime
Run Code Online (Sandbox Code Playgroud)
LinQ中
from a in Attendances
where a.DeviceId == 1
.OrderByDescending(x=>x.Id)
.Take(1)
select a.UpdatedDate
Run Code Online (Sandbox Code Playgroud)