If you followed the naming of the example:
Do you have :
using SnapObjects.Data.Oracle;
in DefaultDataContext1.cs ?
Do you have:
using SnapObjects.Data.Oracle;
in startup.cs?
and ..:
// Uncomment the following line to connect to the Oracle database.
// Note: Replace "ContextName" with the configured context name; replace "key" with the database connection //name that exists in appsettings.json. The sample code is as follows:
services.AddDataContext(m => m.UseOracle(Configuration["ConnectionStrings:R1"]));
?
R1 is the name of my connection profile, you can find it in the "appsettings.json" file:
"AllowedHosts": "*",
"ConnectionStrings": {
"R1": "POOLING=True;ENLIST=true;USER ID=...;DATA SOURCE=\"(DESCRIPTION=(ADDRESS=(HOST=...)(PORT=1521)(PROTOCOL=Tcp))(CONNECT_DATA=(SERVICE_NAME=...)))\";CONNECTION TIMEOUT=15;STATEMENT CACHE SIZE=0;PROMOTABLE TRANSACTION=promotable;PERSIST SECURITY INFO=False;CONNECTION LIFETIME=0;METADATA POOLING=True;LOAD BALANCING=False;STATEMENT CACHE PURGE=False;PASSWORD=...;VALIDATE CONNECTION=False;MIN POOL SIZE=1;MAX POOL SIZE=100;INCR POOL SIZE=5;HA EVENTS=False"
}
HIH