Hello!
We are currently creating SQLServer, Postgres and SQLite databases from one Model.
Unfortunatly SQLite does not support DateTime2 type.
As a workaround we did the folling in the model:
[Column(TypeName = "Date")]
public DateTime DatePictureTaken { get; set; }
This works, but off course now it does not show the time but only the date.
Any suggestions?
Kind regards, Oliver
DateTime2 support for 3 different databases
Re: DateTime2 support for 3 different databases
1. We recommend you to implement fluent (instead of attribute) mapping. This will allow setting the target database, model created for, and needed database-specific data type.
2. For SQLite, please use the datetime (instead of date) database type which corresponds to System.DateTime .NET type: https://www.devart.com/dotconnect/sqlit ... pping.html.
2. For SQLite, please use the datetime (instead of date) database type which corresponds to System.DateTime .NET type: https://www.devart.com/dotconnect/sqlit ... pping.html.