I'm building REST APIs with ASP.NET Core and Entity Framework Core with a database-first approach with clean architecture.
My database is already created and maintained by a DBA team - that's why I need to use Entity Framework Core with a database-first approach, and we need to do reverse engineering using the Scaffold-DbContext
command in the infrastructure layer.
With clean architecture, entities should be placed in Core
layer separate from the infrastructure layer so how we will do that and how to resolve your DbContext
as an interface.