All Projects → DIPSAS → Dapper.Oracle

DIPSAS / Dapper.Oracle

Licence: MIT license
Oracle support for Dapper Micro ORM.

Programming Languages

C#
18002 projects
powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to Dapper.Oracle

1974
Curso 1974 - Criando APIs com ASP.NET Core 2.0 e Dapper
Stars: ✭ 44 (-54.64%)
Mutual labels:  dapper
fapro
Fake Protocol Server
Stars: ✭ 1,338 (+1279.38%)
Mutual labels:  oracle
Trace-Dapper.NET-Source-Code
Trace Dapper.NET Source Code
Stars: ✭ 46 (-52.58%)
Mutual labels:  dapper
ontology-oracle
The Oracle node and Oracle contract
Stars: ✭ 33 (-65.98%)
Mutual labels:  oracle
terraform-provider-opc
Terraform Oracle Public Cloud provider
Stars: ✭ 29 (-70.1%)
Mutual labels:  oracle
content-and-experience-toolkit
The Oracle Content Management Toolkit and SDKs help you develop custom applications that consume content that is managed in the OCM repository. These applications can be developed in the Content Management Cloud or using 3rd party tools.
Stars: ✭ 41 (-57.73%)
Mutual labels:  oracle
PeregrineDb
CRUD Extensions for Dapper.Net
Stars: ✭ 24 (-75.26%)
Mutual labels:  dapper
dungeons-and-dragons-nft
#chainlink #nft
Stars: ✭ 583 (+501.03%)
Mutual labels:  oracle
linkifier
Database reverse engineering
Stars: ✭ 32 (-67.01%)
Mutual labels:  oracle
awesome-sql
List of tools and techniques for working with relational databases.
Stars: ✭ 199 (+105.15%)
Mutual labels:  oracle
Dev.Data
The Dev.Data.SqlDatabaseCommand is a set of components helping C# developers to execute SQL Queries and to retrieve data from SQL Server.
Stars: ✭ 15 (-84.54%)
Mutual labels:  oracle
sha256 plsql
SHA256 PL/SQL Implementation for Oracle 10g,11g.
Stars: ✭ 52 (-46.39%)
Mutual labels:  oracle
ddlfs
Filesystem which represents Oracle Database objects as their DDL stored in .sql files
Stars: ✭ 31 (-68.04%)
Mutual labels:  oracle
simple-oracledb
Extend capabilities of oracledb with simplified API for quicker development.
Stars: ✭ 34 (-64.95%)
Mutual labels:  oracle
apex-plugin-spotlight
Oracle APEX Dynamic Action Plugin - APEX Spotlight Search
Stars: ✭ 20 (-79.38%)
Mutual labels:  oracle
sql-agent
HTTP interface for executing ad-hoc SQL queries.
Stars: ✭ 87 (-10.31%)
Mutual labels:  oracle
Valheim-Free-Game-Server-Setup-Using-Oracle-Cloud
Valheim Oracle Cloud Server Setup
Stars: ✭ 24 (-75.26%)
Mutual labels:  oracle
ercole-agent
Proactive Software Asset Management. Agent component
Stars: ✭ 24 (-75.26%)
Mutual labels:  oracle
eReports-open-source
Sistema de envio e agendamento de relatórios
Stars: ✭ 30 (-69.07%)
Mutual labels:  oracle
jk64-plugin-reportmap
Report Google Map APEX Plugin
Stars: ✭ 37 (-61.86%)
Mutual labels:  oracle

Dapper.Oracle

Oracle support for Dapper Micro ORM.

Build status NuGet

Introduction

Dapper is a great tool if you want to write database-agnostic code. However, sometimes you need to access functionality that is provider-specific. This assembly adds support for writing Oracle-specific SQL, that supports all dbtypes used by the Oracle managed provider on a parameter, supports setting various properties on the command(LOBFetchSize, ArrayBindCount, BindByName), as well as setting CollectionType on the parameter. Using this package, you can now run stored procedures that returns RefCursor, or use array bind count to execute a sql statements with a array of parameters.

Supported Oracle-specific properties

OracleParameter(Managed and UnManaged)

  • OracleDbType enum (all members used by the managed provider)
  • CollectionType enum
  • ParameterStatus (return type when executing stored procedure)
  • ArrayBindSize

OracleCommand (Managed and UnManaged)

  • ArrayBindCount property
  • BindByName property
  • InitialLOBFetchSize (LOB = Large Object Binary)

Works with both Managed and Unmanaged driver

Dapper.Oracle uses reflection to set parameters on both the managed and unmanaged driver(ODP.Net), so it does not have any direct dependencies to a specific Oracle driver.
However, you still need to reference either Oracle.DataAccess or Oracle.ManagedDataAccess in addition to this package. Usage is pretty much like standard Dapper, see usage-section below.

Usage examples

public string RunStoredProcedure(string parametervalue1,string parametervalue2)
{
    var connection = new OracleConnection("mydatabaseconnectionstring");
    var parameters = new OracleDynamicParameters();
    parameters.Add("RETURN_VALUE", string.Empty, OracleMappingType.Varchar2, ParameterDirection.ReturnValue, 4000, true, 0, 0, string.Empty, DataRowVersion.Current);
    parameters.Add("PARAMETER1", parametervalue1, OracleMappingType.Varchar2, ParameterDirection.Input, 4000, true, 0, 0, String.Empty, DataRowVersion.Current);
    parameters.Add("PARAMETER2", parametervalue1, OracleMappingType.Xml, ParameterDirection.Input, 4000, true, 0, 0, string.Empty, DataRowVersion.Current);

    connection.Execute("Schema.Package.MyStoredProcedure", parameters, commandType: CommandType.StoredProcedure);

    return parameters.Get<string>("RETURN_VALUE");
}

public void RunStoredProcedureWithArrayAsParameters(IEnumerable<long> idvalues)
{
    var parameters = new OracleDynamicParameters();
    var idArray = idvalues.ToArray();
    parameters.ArrayBindCount = idArray.Count;

    parameters.Add("ArrayParameter", idArray, OracleMappingType.Int64, ParameterDirection.Input);
    connection.Execute("Schema.Package.MyStoredProcedure", parameters, commandType: CommandType.StoredProcedure);
}

Building

From a powershell script, run build.ps1 from the root folder of the repo.

Example:

build.ps1 -Task Compile
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].