示例#1
0
 /// <summary>
 /// Instantiate a new OracleDatabase instance using the specified serverName
 /// connectionName and credentials
 /// </summary>
 /// <param name="directoryPath"></param>
 /// <param name="connectionName"></param>
 public OracleDatabase(string serverName, string connectionName, OracleCredentials creds = null)
     : base()
 {
     ConnectionStringResolver = new OracleConnectionStringResolver(serverName, creds);
     ConnectionName           = connectionName;
     Register();
 }
        protected override void Initialize()
        {
            OracleDatabase    database = new OracleDatabase();
            OracleCredentials creds    = new OracleCredentials {
                UserId = OracleUserId, Password = OraclePassword
            };
            OracleConnectionStringResolver conn = new OracleConnectionStringResolver {
                ServerName = OracleServerName, InstanceName = OracleInstanceName, Port = OraclePort, Credentials = creds
            };

            database.ConnectionStringResolver = conn;
            Database = database;
        }