Skip to content

jtsoya539/Oracle4Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oracle4Net NuGet Version

Simple Oracle Database connector for Microsoft .NET Core based on official Oracle Data Provider for .NET (ODP.NET) Core.

Features

  • .NET Standard 2.0 Library
  • Easy installation using NuGet
  • Console Logging
  • Oracle Exception Handling

Example

using System;
using Oracle4Net;

class Program
{
	static void Main(string[] args)
	{
		const string dataSource = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XEPDB1)))";
		OracleDatabase db = new OracleDatabase();
		System.Console.WriteLine(db.IsConnected());
		try
		{
			db.Connect("hr", "password", dataSource);
			System.Console.WriteLine(db.ExecuteSQLCount("employees", "department_id = 50"));
			db.Disconnect();
			System.Console.WriteLine(db.IsConnected());
		}
		catch (OracleDatabaseException)
		{
			System.Console.WriteLine("Oracle Exception");
		}
	}
}

Issues

Found a bug? Have suggestion? Please report in the Issues Tracker.

About

Simple Oracle Database connector for Microsoft .NET Core

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages