I have .net core 5 web api project which is created based on SQL DB Entity Framework code-first attitude and repository. I need to switch the project to SQLLite, is it possible to switch to SQLLite and does it supported by EntityFramework?
There is an SQLite database provider for EFCore that should do what you need. There are some limitations that you need to be aware of, since SQLite doesn't have native support for certain data types and has no equivalent concept of schemas or sequences.
The 'unsupported' data types will still be partially functional in that you can store and retrieve values, but comparison and ordering are probably going to fail unless you run them client-side instead of 'on the server' - in your code rather than via SQL execution.
Affected data types (according to the link above):
DateTimeOffset
Decimal
TimeSpan
UInt64
The article suggests using a value converter in the model builder to convert Decimal
to double
to allow native compare & sort. If necessary there are probably ways to do this for the other types as well.