Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions entity-framework/core/providers/sqlite/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Function Mappings - SQLite Database Provider - EF Core
description: Function Mappings of the SQLite EF Core database provider
author: SamMonoRT
ms.date: 08/19/2026
ms.date: 10/22/2026
uid: core/providers/sqlite/functions
---
# Function Mappings of the SQLite EF Core Provider
Expand All @@ -20,7 +20,9 @@ group.Average(x => x.DecimalProperty) | ef_avg(DecimalProperty)
group.Count() | COUNT(*)
group.LongCount() | COUNT(*)
group.Max(x => x.Property) | MAX(Property)
group.Max(x => x.DecimalProperty) | ef_max(DecimalProperty) | EF Core 10.0
group.Min(x => x.Property) | MIN(Property)
group.Min(x => x.DecimalProperty) | ef_min(DecimalProperty) | EF Core 10.0
group.Sum(x => x.Property) | SUM(Property)
group.Sum(x => x.DecimalProperty) | ef_sum(DecimalProperty) | EF Core 9.0
string.Concat(group.Select(x => x.Property)) | group_concat(Property, '')
Expand All @@ -45,7 +47,7 @@ EF.Functions.Unhex(value, ignoreChars) | unhex(@value, @ignoreChars)

.NET | SQL
------------------------- | ---
boolValue.ToString() | CAST(@boolValue AS TEXT)
boolValue.ToString() | CASE WHEN @boolValue THEN 'True' ELSE 'False' END
byteValue.ToString() | CAST(@byteValue AS TEXT)
bytes.ToString() | CAST(@bytes AS TEXT)
charValue.ToString() | CAST(@charValue AS TEXT)
Expand Down Expand Up @@ -81,7 +83,7 @@ DateTime.Now | datetime('now', 'localtime')
DateTime.Today | datetime('now', 'localtime', 'start of day')
DateTime.UtcNow | datetime('now')
dateTime.AddDays(value) | datetime(@dateTime, @value \|\| ' days')
dateTime.AddHours(value) | datetime(@dateTime, @d \|\| ' hours')
dateTime.AddHours(value) | datetime(@dateTime, @value \|\| ' hours')
dateTime.AddMilliseconds(value) | datetime(@dateTime, (@value / 1000.0) \|\| ' seconds')
dateTime.AddMinutes(value) | datetime(@dateTime, @value \|\| ' minutes')
dateTime.AddMonths(months) | datetime(@dateTime, @months \|\| ' months')
Expand Down Expand Up @@ -119,7 +121,7 @@ decimalValue <= d | ef_compare(@decimalValue, @d) <= 0
decimalValue > d | ef_compare(@decimalValue, @d) > 0
decimalValue >= d | ef_compare(@decimalValue, @d) >= 0
double.DegreesToRadians(degrees) | radians(@degrees)
double.RadiansToDegrees(radians) | degrees(@dradians)
double.RadiansToDegrees(radians) | degrees(@radians)
doubleValue % d | mod(@doubleValue, @d)
EF.Functions.Random() | abs(random() / 9223372036854780000.0)
Math.Abs(value) | abs(@value)
Expand Down
9 changes: 5 additions & 4 deletions entity-framework/core/providers/sqlite/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: SQLite Database Provider - Limitations - EF Core
description: Limitations of the Entity Framework Core SQLite database provider as compared to other providers
author: SamMonoRT
ms.date: 04/16/2026
ms.date: 10/22/2026
uid: core/providers/sqlite/limitations
---
# SQLite EF Core Database Provider Limitations
Expand All @@ -19,16 +19,17 @@ The common relational library (shared by EF Core relational database providers)

## Query limitations

SQLite doesn't natively support the following data types. EF Core can read and write values of these types, and querying for equality (`where e.Property == value`) is also supported. Other operations, however, like comparison and ordering will require evaluation on the client.
SQLite doesn't natively support the following data types. EF Core can read and write values of these types, and querying for equality (`where e.Property == value`) is also supported. Other operations, however, like comparison and ordering, aren't translated to SQL and have to be evaluated on the client.

* `DateTimeOffset`
* `decimal`
* `TimeSpan`
* `ulong`

Instead of `DateTimeOffset`, we recommend using `DateTime` values. When handling multiple time zones, we recommend converting the values to UTC before saving and then converting back to the appropriate time zone.

The `decimal` type provides a high level of precision. If you don't need that level of precision, however, we recommend using `double` instead. You can use a [value converter](xref:core/modeling/value-conversions) to continue using `decimal` in your classes.
SQLite doesn't natively support `decimal` either, but EF Core translates comparison, ordering, arithmetic and aggregate operations on `decimal` values to functions and a collation that it registers on the connection, such as `ef_compare` and `EF_DECIMAL`. See [Function Mappings](xref:core/providers/sqlite/functions) for the translations.

If you don't need the precision of `decimal`, you can use `double` instead. You can use a [value converter](xref:core/modeling/value-conversions) to continue using `decimal` in your classes.

```csharp
modelBuilder.Entity<MyEntity>()
Expand Down
Loading