Tuesday 13 February 2024

Entity framework scaffolding oracle database first

First:

install the following packages, be careful of package version. 












Second:

open package manger and run the following command after you update with yours

Scaffold-DbContext "Data Source=serverip/sid;Persist Security Info=True;User ID=un;Password=pw;Connection Timeout=0" Oracle.EntityFrameworkCore -OutputDir Model -Context "ContextName" -Tables  table1, table2....,tablen

If you didn't list the tables names this command will generate for all db objects 


No comments:

Post a Comment