OData / ModelBuilder

A project to generate Edm (Entity Data Model) from CLR types
19 stars 19 forks source link

Add support for .Net 6 BCL DateOnly and TimeOnly #22

Closed dxrdxr closed 2 years ago

dxrdxr commented 3 years ago

.Net 6 Preview 4 adds support for 2 new BCL structures: DateOnly and TimeOnly

DateOnly maps very close to Edm.Date, the only exception is that DateOnly range is only 0-9999 CE, while Edm.Date is -9999-9999.

TimeOnly maps very close to Edm.TimeOfDay, except that the fractionalSeconds has different precision.

The Convention Builder should recognize these types and map them accordingly.

Note: EF Core 6 does not yet map these types to SQL Server, it is expected in EF Core 7?

dxrdxr commented 2 years ago

Fixed in Commit 024afcb