OracleDataContextOptions.OracleDataContextOptions(string connectionString) Constructor
.NET Standard 2.x
Initializes a new instance of the OracleDataContextOptions class by passing the connection string as a parameter.
Namespace: SnapObjects.Data.Oracle
Assembly: SnapObjects.Data.Oracle.dll
Syntax
public OracleDataContextOptions(string connectionString) : base(DatabaseType.Oracle)
Parameters
connectionString
System.String
A string containing connection information about how to connect to the data source.
Examples
The following code example uses a connection string to initialize an instance of the OracleDataContextOptions
class.
using Appeon.ApiDoc.Models;
using SnapObjects.Data;
using SnapObjects.Data.Oracle;
using System;
namespace Appeon.ApiDoc.OracleDataContextOptionsExamples
{
public class OracleDataContextOptionsExample
{
public void Example()
{
var options = new OracleDataContextOptions(CONNECTION_STRING);
var dataContext = new OracleDataContext(options);
Console.WriteLine(dataContext.ContextOptions.DatabaseType);
/*This code produces the following output:
Oracle
*/
}
}
}
Applies to
.NET Standard
2.x