Devart is glad to announce the release of dotConnect for SQLite 5.18 — a powerful ADO.NET provider for SQLite with advanced support for Entity Framework, Entity Framework Core, LinqConnect (LINQ to SQLite) and NHibernate. The new version of Devart dotConnect for SQLite contains significant improvements of Entity Framework Core support, improving Entity Framework Core Code-First Migrations a lot and adding support for previously unsupported operations. Besides, we supported mapping of more .NET data types and extended capabilities of LINQ query translation to SQL.
LINQ to Entities Improvements
dotConnect for SQLite now supports translation of the following LINQ features to SQL for both EF Core 3 and EF Core 5:
- The static IsNullOrWhiteSpace() method of the String class
- The static Today property and instance DayOfWeek and Ticks properties of the DateTime class
- The following static methods of the Math class: Abs(), Round(), Truncate(), Floor(), Ceiling(), Max(), Min(), Pow(), Sqrt(), Log(), Log10(), Sin(), Cos(), Tan(), Asin(), Acos(), Atan()
The SQLiteFunctions and SQLiteTextFunctions classes, used for calling database-specific functions and full-text search functions in Entity Framework v4 – v6, are now available for Entity Framework Core.
Uri Data Type Mapping
For Entity Framework Core 3 and 5, dotConnect for SQLite now supports mapping the internet/intranet System.Uri type to SQLite ‘text’ data type.
Code-First Migrations Improvements
SQLite database engine has significant architectural limitations for the ALTER TABLE operation. This is why dotConnect for SQLite didn’t have support for a number of EF Core Code-First Migrations operations. The new dotConnect for SQLite version provides support for more operations via a workaround with creating a new table and copying data from the old table to it:
- AlterColumn
- RenameColumn (for SQLite 3.24 or lower)
- DropColumn (for SQLite 3.34 or lower)
- AddForeignKey
- DropForeignKey
- AddPrimaryKey
- DropPrimaryKey
- If SQLite is of version 3.25/3.35 or higher, the native SQLite ALTER TABLE RENAME COLUMN and ALTER TABLE DROP COLUMN commands, which are supported since these versions, are used.
- If SQLite version is lower, the workaround with re-creating a table is used.
Feel free to download the new version of dotConnect for SQLite, try the new functionality, and leave feedback.
Devart development team
https://www.devart.com/dotconnect/sqlite/