DateTime2 support for 3 different databases
Posted: Mon  13 Jul 2015 16:34
				
				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
			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