After upgrading from EF 2.1.x to 3.1.x this query started to throw
Can't write CLR type System.DateTime with handler type IntervalHandler
But I'm not really sure how can I "nicely" rewrite this query, so performing math on those dates isn't going to explode
input is IQueryable
input.OrderBy
(
x =>
(x.RegistrationDate == null ? new DateTime(1990,1, 1).Date : x.RegistrationDate.Value.Date)
-
(x.InvoiceDate == null ? new DateTime(1990, 1, 1).Date : x.InvoiceDate.Value.Date)
)
Both of those Dates
have type: timestamp without time zone
in database
PostgreSQL 8.4.20 64-bit
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
Thanks in advance!