C
C#13mo ago
albassort

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
JakenVeina
JakenVeina13mo ago
you can always just not scaffold
albassort
albassortOP13mo ago
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
JakenVeina
JakenVeina13mo ago
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
Jimmacle
Jimmacle13mo ago
when did sqlite get an actual datetime data type? afaik EFC maps most date/time types to TEXT
Trinitek
Trinitek13mo ago
what does your entity model and context modelbuilder look like? it should use TEXT by default
Want results from more Discord servers?
Add your server