Replies: 1 comment 4 replies
-
I think we don't have any tests on the compatibility between SQL Server and the synced type in SQLite If you have already a really small sample to test it, would be cool, otherwise I'll work on it. By the way, did you try to use EF converter ? public class YourDbContext : DbContext
{
Ctors() {...}
protected override void ConfigureConventions(ModelConfigurationBuilder builder)
{
builder.Properties<DateOnly>()
.HaveConversion<DateOnlyConverter>()
.HaveColumnType("date");
}
} |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm using some DateOnly and TimeOnly properties in my EntityFrameworkCore database context.
My server is using MSSql and there the data is saved as "date".
If i sync it to my frontend with Sqlite it gets a TEXT colum. I think this is normal because EntityFramework migrations also create it as TEXT.
The problem is that in this TEXT colum the value will be "2024-06-07 00:00:00" after the sync.
If I trie to load the data now with EntityFramework a get an error because this string can not be casted to DateOnly.
If I manually delete the time inside the Sqlite db I works.
Is it possible to remove the time inside the sync process?
I already tried with a custom converter but this doesn't work
Beta Was this translation helpful? Give feedback.
All reactions