Posts

Showing posts from November, 2022

Oracle (21c) with .Net Core and C#

Image
When considering the enterprise databases, Oracle is acting a huge role. Today let's talk about how to install Oracle locally and access the database with .Net and C#.  NOTE : You can find the connection string formats in  tnsnames.ora   Install and connect to localhost Connect and Retrieve data using OracleConnection We can download the free developer edition of the Oracle called 'Oracle Xpress Edition' for free. So I'm going to use that in this tutorial for install in the local hard drive.  Search for Oracle Xpress Edition in the internet (https://www.oracle.com/ca-en/database/technologies/appdev/xe.html) and follow the instruction to install.  Create a .Net Core project (you can create a console project, web api, etc.). Install Oracle.EntityFrameworkCore by Oracle using NuGet package manager.  Use the following sample code to connect and retrieve data from local database table.  Credentials public static string db = " localhost /XEPDB1"; public static strin