C# 报错 Entity DbArithmeticExpression arguments must have a numeric common type

lamda表达式 时间类型不能直接相减计算差值。

 

一般情况下,计算时间间隔

(aTime-bTime).TotalMinutes

 

但是在lamda表达式中

DbFunctions.DiffMinutes(aTime,bTime)

 

posted @ 2022-01-18 14:21  RookieCoderAdu  阅读(68)  评论(0)    收藏  举报