A project I work on runs mainly on SQL Server, but there are times we want
to be able to create the same data model in SQLite for portability.

We mostly use EF6 to access the database; we have a code-first approach and
write custom scripts to generate the database schema.

We have a custom ConnectionFactory to determine whether a new database
context should use a SQLiteConnection or SQLServerConnection. (Yes it's
deprecated but it works...)

This was working well until we added a TimeSpan field to one of our
entities. Now we get an exception on model creation: There is no store type
corresponding to the EDM type 'Edm.Time' of primitive type 'Time'.

I know it would be possible for us to store the Ticks or TotalSeconds of
the TimeSpan in a SQLite INTEGER or REAL field, but we've already got
deployments using the TimeSpan field on SQLServer and would rather avoid
having to change that schema.

Would it be possible for a future version of SQLite to support TimeSpan
mapping in the entity framework?

Thanks in advance,

 - Barry Smith
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to