I have been trying to retrieve data from an Oracle 12g database using the following:
using (MyDbContext db = new MyDbContext())
{
var t = db.MyTable.ToList();
}
The underlying SQL is:
SELECT
"Extent1"."TOKEN" AS "TOKEN",
"Extent1"."FINGERPRINT" AS "FINGERPRINT",
"Extent1"."EXPIRES" AS "EXPIRES",
"Extent1"."ISSUED" AS "ISSUED"
FROM "MYSCHEMA"."MYTABLE" "Extent1
I run the SQL above within Oracle SQL Developer and it works just fine.
There is only 1 record in the MYSCHEMA.MYTABLE table but when calling the .ToList()
I get zero results.
Am I missing some setting with Oracle's Entity Framework?
Using from nuget:
Apparently when I inserted the new record into the MYSCHEMA.MYTABLE
table I forgot to COMMIT
it to the database.
Therefore, the Oracle SQL Developer tool was able to show me that the record was en route to becoming a record but until I committed it no other external process would be able to retrieve the record.
Lesson learned. Maybe this answer will be helpful to others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With