Dapper-FluentMap
Dapper-FluentMap copied to clipboard
How can I make the database to use the default value I set,How to map.
My program use Sqlite 3 and I set a datetime field with the defalut value of datetime('now', 'localtime').
- When I map the field with the Ignore method, it's ok to insert a new record ,the field is filled a correct datetime value(my server time).But when I get the record(by ExecuteReader) from database ,someting is wrong (System.NotImplementedException) because the field is ignored.
- I try to map the field with SetGeneratedOption(DatabaseGeneratedOption.Identity) or .SetGeneratedOption(DatabaseGeneratedOption.Computed) ,the field is filled with '0001-01-01 00:00:00'
Is there a way to do that I can get the correct datetime value and I can query the record without exception? Thanks!
@babbitt9 can you share the POCO class and the corresponding map so we can reproduce this issue?
I'm archiving this repository as I'm not using this library myself anymore and have no time maintaining it. Thanks for using it.