My Oracle Support Banner

ODPM 21c : InvalidCastException In EF Core Selecting Column Of TIMESTAMP WITH LOCAL TIME ZONE (Doc ID 3010998.1)

Last updated on MARCH 20, 2024

Applies to:

Oracle Data Provider for .NET - Version 21.3.0.0.0 and later
Information in this document applies to any platform.

Symptoms

While using ODP.NET it is expected that, TIMESTAMP WITH LOCAL TIME ZONE column should be mapped to scaffolded model. But instead the code throws InvalidCastException.

Currently Oracle is mapping ‘Timestamp with Local Time zone’ to .NET type DateTimeOffset during DB first (Scaffolding). However this seems to create some issue when trying to fetch the ‘Timestamp with Local Time zone’ column data. 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.