I have a simple web solution (incomplete) using NetFrameworkCore for Oracle.
See HomeController.CS & AspNetUser.CS -->
The issue is I have an AspNetUser record that was created in DB via Microsoft.AspNetCore.Identity.UserManager. This record is accessible by finding by ID, managed to retrieve record.
However, on stopping the solution and doing a re-run (without creating new AspNetUser), I cannot retrieve the record via the ID. Instead, a 500 error with invalid cast exception on Oracle.ManagedDataAccess.Client.OracleDataReader.GetDateTimeOffset() is thrown. The issue may not be table column related as re-creating the table allows the record to be accessible again albeit once as well.
What could be the issue then? I apologize as I am new to Oracle and net core web. Below are the links to the error and web solution.
I have managed to resolve the issue of InvalidCastException. The current Oracle table was created manually without using EntityFrameworkCore tool.
After dropping the table and re-creating using the commands "add-migration " & "update-database", the table is accessible on subsequent reads.
The issue was with the column, LockoutEnd.
"LockoutEnd" TIMESTAMP(7) NULL,
"LockoutEnd" TIMESTAMP (3) WITH TIME ZONE,