MicroORM.Oracle 1.0.1

dotnet add package MicroORM.Oracle --version 1.0.1                
NuGet\Install-Package MicroORM.Oracle -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MicroORM.Oracle" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroORM.Oracle --version 1.0.1                
#r "nuget: MicroORM.Oracle, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MicroORM.Oracle as a Cake Addin
#addin nuget:?package=MicroORM.Oracle&version=1.0.1

// Install MicroORM.Oracle as a Cake Tool
#tool nuget:?package=MicroORM.Oracle&version=1.0.1                

MicroORM.Oracle : Overview

A high performance Micro-ORM supporting Oracle Database Server. This is the extension version for easy to configure and use.

Features

Query
QueryAsync
QueryFirst
QueryFirstAsync
QuerySingle
QuerySingleAsync
QueryFirstOrDefault
QueryFirstOrDefaultAsync
QuerySingleOrDefault
QuerySingleOrDefaultAsync
QueryMultiple
QueryMultipleAsync
Execute
ExecuteAsync
ExecuteReader
ExecuteReaderAsync
ExecuteScalar
ExecuteScalarAsync

How to use

You can configure this package in two ways. I will explain both two ways. you can use your suitable one.

One

You have to create a new class like ApplicationDbContext inherited from the DatabaseContext class that comes from this library. you have to add using MicroORM.Oracle namespace.

    public class ApplicationDbContext:DatabaseContext
    {
        public ApplicationDbContext():base("DatabaseConnectionString")
        {
        }
    }   
 

Controller code sample.

    [ApiController]
    [Route("[controller]/[action]")]
    public class TestController : ControllerBase
    {                      
        [HttpGet]
        public IActionResult GetAll()
        {
            ApplicationDbContext dbContext = new ApplicationDbContext();
            var data= dbContext.Query<ReturnType>("Query").ToList();
            return Ok(data);
        }        
    }

Two

If you use dependency injection then this option is for you.

    using MicroORM.Oracle;
    
    builder.Services.AddDatabaseContext(options =>
    {
        options.ConnectionString = "DatabaseConnectionString"
    });

Controller code sample.

    [ApiController]
    [Route("[controller]/[action]")]
    public class TestController : ControllerBase
    {
        ApplicationDbContext _dbContext;
        public TestController(ApplicationDbContext dbContext) 
        { 
          _dbContext=dbContext;
        }               
        [HttpGet]
        public IActionResult GetAll()
        {            
            var data= _dbContext.Query<ReturnType>("Query").ToList();
            return Ok(data);
        }        
    }
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 100 10/31/2024