REST API with Oracle EntityFrameworkCore 5
On February 11, 2021, the senior principal product manager at Oracle Alex Keh announced the release of Oracle Entity Framework Core 5. After seeing the news, I was wondering what would it take to wire up a C# REST API project to work with the new version 5.
In this story, I will demonstrate how to scaffold a clean architecture NetCore 5 REST API project — prewired with CQRS/Repository patterns and boilerplate code for CRUD, sort, filter, and paging. Then configure the solution to use Oracle Entity Framework Core for data access. Source code is available in Github.
Tutorial Content
The tutorial has three parts:
Part 1: Scaffold a REST API project
Using Visual Studio template OnionAPI, create a Clean Architecture solution running on NetCore 5.
Part 2: Configure the solution to work with the Oracle database
Update connection string and ApplicationDbContext to point to Oracle DB and add Oracle Entity Framework Core Nuget package.
Part 3: Database Migration
Run add-migration and update-database