OracleDataContext.OracleDataContext(IDataContextOptions dataContextOptions) Constructor
.NET Standard 2.x
Initializes a new instance of the OracleDataContext class by passing the OracleDataContextOptions type object as a parameter.
Namespace: SnapObjects.Data.Oracle
Assembly: SnapObjects.Data.Oracle.dll
Syntax
public OracleDataContext(IDataContextOptions dataContextOptions) : base(dataContextOptions)
Parameters
dataContextOptions
SnapObjects.Data.IDataContextOptions
The options to be set for the DataContext
object.
Examples
The following code example uses the OracleDataContextOptions
object to initialize an instance of the OracleDataContext
class.
using Appeon.ApiDoc.Models;
using Oracle.ManagedDataAccess.Client;
using SnapObjects.Data;
using SnapObjects.Data.Oracle;
using System;
namespace Appeon.ApiDoc.OracleDataContextExamples
{
public class OracleDataContextExample
{
public void Example1()
{
var dataContext = new OracleDataContext(new OracleDataContextOptions(CONNECTION_STRING));
Console.WriteLine(dataContext.ContextOptions.DatabaseType);
/*This code produces the following output:
Oracle
*/
}
}
}
Applies to
.NET Standard
2.x