Skip to content

Commit 4ce93b2

Browse files
rojiCopilot
andcommitted
Update entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f63db23 commit 4ce93b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • entity-framework/core/what-is-new/ef-core-11.0

entity-framework/core/what-is-new/ef-core-11.0/whatsnew.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ For more information, see the [full documentation on temporal tables](xref:core/
442442

443443
### Additional DateTimeOffset and date/time translations
444444

445-
EF Core 11 adds several new SQL Server translations for `DateTimeOffset`. Properties such as `DateTime`, `UtcDateTime`, and `LocalDateTime` are now translated, allowing you to extract a `DateTime` from a `DateTimeOffset` in different time zones directly in your queries. `Offset.TotalMinutes` is also translated, giving access to the offset component, and `ToOffset()` allows converting a `DateTimeOffset` to a different offset via SQL Server's `SWITCHOFFSET`.
445+
EF Core 11 adds several new SQL Server translations for `DateTimeOffset`. Properties such as `DateTime`, `UtcDateTime`, and `LocalDateTime` are now translated, allowing you to access the `DateTime` component directly in your queries: `DateTime` returns the date and time component without converting the offset, while `UtcDateTime` and `LocalDateTime` represent UTC and server-local conversions, respectively. `Offset.TotalMinutes` is also translated, giving access to the offset component, and `ToOffset(offset)` allows converting a `DateTimeOffset` to a different offset via SQL Server's `SWITCHOFFSET`.
446446

447447
You can also now construct a `DateTimeOffset` from a `DateTime` directly in LINQ queries, using `new DateTimeOffset(dateTime)` or `new DateTimeOffset(dateTime, offset)`, which translates to SQL Server's `TODATETIMEOFFSET` function.
448448

0 commit comments

Comments
 (0)