为什么EF核心无法比较DateTimeOffset?

时间:2020-01-23 11:58:57

标签: c# entity-framework-core

((a.DateOfRecive == null || b.DateOfRecive == null) || a.DateOfRecive.Value.Month == DateTimeOffset.Now.Month) или ((a.DateOfRecive == null || b.DateOfRecive == null) || a.DateOfRecive.Value.Month == b.DateOfRecive.Value.Month)

获取此异常

could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

EF核心3.1

0 个答案:

没有答案