Skip to content

Commit 0518e99

Browse files
rojiCopilot
andauthored
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 bf10de8 commit 0518e99

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
@@ -398,7 +398,7 @@ For the full `JSON_CONTAINS` SQL Server documentation, see [`JSON_CONTAINS`](/sq
398398

399399
### Additional DateTimeOffset and date/time translations
400400

401-
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`.
401+
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`.
402402

403403
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.
404404

0 commit comments

Comments
 (0)