SqlLite Provider

Jul 1, 2015 at 6:33 PM
I have a application that uses SqlServer provider vith VITA and all is ok, but i need to make it possible to use SQLLite on slower standalone mathines, so i created seperate AppModules that are loaded acording to the configuration specified, the problem is that vita SqlLite provider throws on this entity definition

[Column(DbType = DbType.Time)]
TimeSpan HoraAbertura { get; set; }

The error is that it is not supported, is it not possible for vita to use some other type if the database dos not suporte it? an int or datetime?

Regards
Jul 1, 2015 at 7:54 PM
First, why don't you use the same model (modules) for both db types? Look at BookStore sample, it runs against any of supported db types.
Secondly, did you try it without DbType specification in attribute? For SqlServer, I believe for TimeSpan the db type is Time by default; and SQLite should fit it as well.
SQLite is 'type-less', all columns are 'objects', so my guess is that here SQLite driver rejects the attempt to set the DbType explicitly
Jul 2, 2015 at 10:38 PM
The error i am getting...

Driver failed to match db type for data type System.TimeSpan, member Gestao.Documento.HoraCarga
Driver failed to match db type for data type System.TimeSpan, member Gestao.Documento.HoraDescarga

entity definition

[Nullable]
TimeSpan HoraCarga { get; set; }

[Nullable]
TimeSpan HoraDescarga { get; set; }

etx....

Regards,
Jul 2, 2015 at 11:13 PM
I have a fix. How urgent is this for you? just don't want to push new version with tiny fix. Can it wait for a week or so?
Jul 2, 2015 at 11:48 PM
It can wait, no problem, not urgent

Thanks,
Jul 13, 2015 at 11:21 PM
pushed, check it
thx
Roman