w3ti.OpenBaseNET.Oracle.Template
1.0.0
dotnet new install w3ti.OpenBaseNET.Oracle.Template@1.0.0
OpenBaseNET Oracle Template
OpenBaseNET for Oracle is a template for .NET 10 projects using an Oracle database.
The template was built to address the need to create projects quickly and efficiently. A .NET project template to accelerate API development, pre-configured with Clean Architecture, Entity Framework Core, and Oracle.
About the Project
Starting a new project requires a lot of repetitive configuration: structuring folders, defining application layers, setting up data access, etc.
This template was created to eliminate that initial setup step. With a single command, you'll have a complete and robust .NET solution, ready for you to focus on what really matters: your application's business rules.
🏛️ Architecture Structure
The template uses Clean Architecture principles to clearly separate responsibilities, ensuring organized, testable, and maintainable code.
MinhaNovaApi.Domain: The innermost layer and the heart of the application. Contains business entities, enums, and repository interfaces. It does not depend on any other layer.
MinhaNovaApi.Application: Contains the business logic and use cases (also known as "interactors"). Orchestrates the data flow between the presentation and infrastructure layers, but has no knowledge of their implementation details.
MinhaNovaApi.Infrastructure: Implements the abstractions defined in the inner layers. This is where the Entity Framework
DbContextlives, along with the concrete repository implementations and integrations with any external services (such as payment gateways, email sending, etc.).MinhaNovaApi.API (Presentation): The input/output layer. Contains API Controllers, DTOs (Data Transfer Objects), and the service startup configuration (
Program.cs). It is the only layer the end user "sees."
Main Technologies
- .NET 10
- Entity Framework Core
- Oracle.ManagedDataAccess.Core (ODP.NET) - Oracle provider for .NET
- Clean Architecture
- Repository Pattern
- Oracle-ready
🚀 How to Use
To create a new project from this template, follow the steps below.
Prerequisites
- .NET SDK (version 10.0 or higher).
- Oracle Database installed and configured (Oracle XE, Standard, or Enterprise).
1. Database Configuration
Configure your connection string in the appsettings.json or appsettings.Development.json file:
{
"ConnectionStrings": {
"OpenBaseOracle": "Data Source=localhost:1521/XEPDB1;User Id=openbase;Password=your_password;"
}
}
Tip: The
Data Sourceuses Oracle EZConnect format:host:port/service_name.
2. Running the Project
Run the project and the API will be ready to use.
dotnet run --project src/OpenBaseNET.Presentation.Api/OpenBaseNET.Presentation.Api.csproj
3. Sample Model
The project comes with a class that maps an entity called Customer. It is not required to run your project — it serves only as a guide and can be deleted without any issues.
📦 Main Packages
- Oracle.ManagedDataAccess.Core - Oracle ODP.NET managed driver for .NET
- Oracle.EntityFrameworkCore - Entity Framework Core provider for Oracle
- Entity Framework Core - ORM for data access
- Dapper - Micro ORM for high-performance queries
- MediatR - Mediator pattern implementation
- AutoMapper - Object-to-object mapping
- Serilog - Structured logging
- Polly - Resilience and transient fault handling library
Acknowledgments
Thank you for your interest in this project.
Feedback is always welcome
Rodrigo S. Brito rodrigo@w3ti.com.br
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
- Template inicial OpenBaseNET para Oracle
- Driver Oracle.ManagedDataAccess.Core (ODP.NET)
- Provider Oracle.EntityFrameworkCore
- Resiliência com OracleExceptionPredicate (códigos ORA-*)
- Connection string no formato EZConnect