Well, it seems this is basically NOT POSSIBLE.
A TimeSpan
property must be marked NotMapped
, or by fluent Ignore
(then saved as per Steve's answer).
At least that's my understanding now.
EF
does not support type mapping or type conversion..
https://stackoverflow.com/a/12053328
Btw, NHibernate
maps TimeSpan
to integer by default, when using SqLite
. No conversions or tricks needed there. Not sure about other databases.