System.Data.SQLite
View Ticket
Not logged in
Ticket UUID: 919a8c2a9169b2bc739631472204bf6cf32a5af0
Title: System.Data.SQLite.EF6 & DateTimeOffset
Status: Open Type: Feature_Request
Severity: Important Priority: Medium
Subsystem: LINQ Resolution: Under_Review
Last Modified: 2017-11-13 17:43:20
Version Found In: 1.0.106.0
User Comments:
anonymous added on 2017-11-13 14:02:44:
Hi SQLite Team,
BACKGROUND:
SQLITE for EntityFrameworkCore supports "DateTimeOffset" values.
SQLITE for EntityFramework6 DOES NOT support "DateTimeOffset" values.

CAUSE:
This seems to be a coding defect in:
System.Data.SQLite.EF6.SQLiteProviderManifest.GetStoreType

For many types, there is code such as:

case PrimitiveTypeKind.DateTime:
return TypeUsage.CreateDefaultTypeUsage(base.StoreTypeNameToStorePrimitiveType["datetime"]);

There does not appear to be one for DateTimeOffset.

I believe that in SQLITE for EFCore, DateTimeOffsets are persisted as strings.

Thanks for your help in fixing this.  We're working to make a library support EFCore and EF6 and this seems to be all that remains.