Hands on Guide: Entity Framework Core – Database First (Oracle)

Not too rare I get an database from a legacy system I have to deal with. The information needs to be extracted and the data has to be transformed to a newer generation of database  system. Somtimes even to migrate the data in a new scheme for different use cases. The migrated data then will be used in a modern application tailored for the customers needs.

The way the information is stored in legacy systems sometimes differs from the standard we know today (for example, storing dates was way diffrent 30 years ago, see below)

This hands on guide shows you a fast way how to extract information from an Oracle database using the „Database first approach with Entity Framework Core“ to generate models.

dotnet ef dbcontext scaffold "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<host>)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=<service>)));Persist Security Info=True;User Id=<user>;;Password=<password>;" Oracle.EntityFrameworkCore
Thomas Trügler Written by: