Scaffolding converting sql DateTime from sqlite to byte[], how can I keep it as long / C# DateTime
Question: Using Entity Framework to scaffold a sqlite database, its converting datetime to byte arrays (byte[]) instead of keeping them as longs or converting them to Int64 / DateTime, is there an option to change this or do i have to just change it manually every time I scaffold
5 Replies
you can always just not scaffold
Cool
while technically true, not helpful, I would like to scaffold
This is some type of error/ incompatibility that i would presume has a fix or has been addressed somewhere, but I cant find it
also rowId isn't scaffolded and I would like to have that so I don't need to write manual sql when i need to reference it
I dunno why the tool would choose byte[] as a mapping for anything in SQLite, but no, you're not likely to have options for changing what it generates
when did sqlite get an actual datetime data type?
afaik EFC maps most date/time types to
TEXT
what does your entity model and context modelbuilder look like? it should use TEXT by default