CoreOracleDatabase 2025.5.23
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CoreOracleDatabase --version 2025.5.23
NuGet\Install-Package CoreOracleDatabase -Version 2025.5.23
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="CoreOracleDatabase" Version="2025.5.23" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CoreOracleDatabase" Version="2025.5.23" />
<PackageReference Include="CoreOracleDatabase" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CoreOracleDatabase --version 2025.5.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CoreOracleDatabase, 2025.5.23"
#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.
#:package CoreOracleDatabase@2025.5.23
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CoreOracleDatabase&version=2025.5.23
#tool nuget:?package=CoreOracleDatabase&version=2025.5.23
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CoreOracleDatabase
Biblioteca que proporciona una implementación robusta para la conexión y operaciones con bases de datos Oracle en aplicaciones .NET.
Características
- Conexión segura a Oracle Database
- Manejo de transacciones
- Ejecución de consultas y procedimientos almacenados
- Soporte para parámetros
- Manejo de errores robusto
- Soporte para operaciones asíncronas
- Manejo de conexiones temporales
- Integración con inyección de dependencias
Instalación
El componente se puede instalar como un paquete NuGet:
dotnet add package DeveloperKit.CoreOracleDatabase
Requisitos
- Oracle Database 11g o superior
- Oracle Data Provider for .NET (ODP.NET)
- .NET Framework 4.8 o superior
- Visual Studio 2019 o superior
Uso Básico
Configuración Inicial
// Configurar la conexión
services.AddScoped<IOracleRepository, OracleRepository>(provider =>
{
var connectionString = Configuration.GetConnectionString("OracleConnection");
return new OracleRepository(connectionString);
});
Ejemplo de Uso
// Inyección del repositorio
private readonly IOracleRepository _oracleRepository;
public MyService(IOracleRepository oracleRepository)
{
_oracleRepository = oracleRepository;
}
// Ejecutar consulta
public async Task<DataTable> GetCustomers()
{
var query = "SELECT * FROM CUSTOMERS WHERE ACTIVE = :active";
return await _oracleRepository.ExecuteQueryAsTableAsync(query, parameters =>
{
parameters.Add("active", OracleDbType.Int32, 1, ParameterDirection.Input);
});
}
// Ejecutar procedimiento almacenado
public async Task ExecuteStoredProcedure()
{
var spName = "PKG_CUSTOMERS.GET_CUSTOMER";
await _oracleRepository.ExecuteStoredProcedureAsync(spName, parameters =>
{
parameters.Add("p_customer_id", OracleDbType.Int32, 123, ParameterDirection.Input);
parameters.Add("p_result", OracleDbType.Int32, ParameterDirection.Output);
});
}
Manejo de Transacciones
public async Task ExecuteWithTransaction()
{
try
{
// Iniciar transacción
_oracleRepository.BeginTransaction();
// Ejecutar operaciones
await _oracleRepository.ExecuteQueryAsync("INSERT INTO CUSTOMERS (...) VALUES (...)"));
await _oracleRepository.ExecuteQueryAsync("UPDATE CUSTOMERS SET (...) WHERE (...)"));
// Confirmar transacción
_oracleRepository.CommitTransaction();
}
catch (Exception ex)
{
// Revertir transacción en caso de error
_oracleRepository.RollbackTransaction();
throw;
}
}
Manejo de Parámetros
// Parámetros de entrada
parameters.Add("p_input", OracleDbType.Varchar2, "valor", ParameterDirection.Input);
// Parámetros de salida
parameters.Add("p_output", OracleDbType.Varchar2, ParameterDirection.Output);
// Parámetros de entrada/salida
parameters.Add("p_inout", OracleDbType.Int32, 1, ParameterDirection.InputOutput);
Mejores Prácticas
- Siempre usar parámetros en las consultas para evitar inyección SQL
- Manejar transacciones para operaciones que afectan múltiples tablas
- Usar conexiones asíncronas para operaciones largas
- Implementar manejo de errores robusto
- Usar procedimientos almacenados cuando sea posible
- Implementar timeout adecuado para consultas
- Usar pool de conexiones para mejor rendimiento
Soporte
Para reportar errores o solicitar características, por favor abre un issue en el repositorio de GitHub.
Licencia
Este proyecto está bajo licencia MIT. Consulta el archivo LICENSE para más detalles.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- CoreUtilerias (>= 2025.5.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Oracle.ManagedDataAccess.Core (>= 23.8.0)
-
net7.0
- CoreUtilerias (>= 2025.5.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Oracle.ManagedDataAccess.Core (>= 23.8.0)
-
net8.0
- CoreUtilerias (>= 2025.5.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Oracle.ManagedDataAccess.Core (>= 23.8.0)
-
net9.0
- CoreUtilerias (>= 2025.5.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.3)
- Oracle.ManagedDataAccess.Core (>= 23.8.0)
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 |
|---|---|---|
| 2026.3.6 | 35 | 3/6/2026 |
| 2026.2.27 | 48 | 2/27/2026 |
| 2025.11.11 | 270 | 11/11/2025 |
| 2025.10.26 | 171 | 10/26/2025 |
| 2025.10.10 | 110 | 10/10/2025 |
| 2025.8.14 | 183 | 8/19/2025 |
| 2025.7.24 | 521 | 7/24/2025 |
| 2025.7.21 | 635 | 7/22/2025 |
| 2025.7.20 | 269 | 7/20/2025 |
| 2025.7.19 | 258 | 7/20/2025 |
| 2025.7.13 | 187 | 7/14/2025 |
| 2025.7.9 | 174 | 7/8/2025 |
| 2025.7.8 | 180 | 7/8/2025 |
| 2025.7.3 | 151 | 7/4/2025 |
| 2025.7.2 | 154 | 7/4/2025 |
| 2025.6.11 | 330 | 6/11/2025 |
| 2025.5.23 | 134 | 5/23/2025 |
| 2025.5.20 | 191 | 5/20/2025 |
| 2025.5.8 | 205 | 5/8/2025 |
| 2025.5.4 | 185 | 5/4/2025 |
Loading failed