SQLite DATETIME column with Entity Framework
I have an existing SQLite database that I want to use in Entity Framework. However SQLite's weird type system means you can even create table temp(temp datetime); insert into temp values ('whatever'); The dates are stored as Unix time integers. My model classes are autogenerated by Visual Studio, so how do I tell the code generator to handle these dates correctly and not make the application throw String was not recognized as a valid DateTime. exceptions on startup? You have to change your connection string to something like data source="|DataDirectory|\data.sqlite";datetimeformat=UnixEpoch