飞扬的Blog
主页
登录
EF Core linq 时间相差
"date"
:
"2020-09-24 05:16:43"
"classfiy"
:
"ef core"
"author"
:
"飞扬"
"viewTimes"
:
510
返回
```csharp DbFunctions dfunc = null; if (canDraw.Value == true) orders = orders.Where(o => SqlServerDbFunctionsExtensions.DateDiffDay(dfunc, o.Time, DateTime.Now) >= 7); ```