Search code examples
c#entity-frameworkasp.net-coredbcontextdata-access-layer

Any way to update my separate DAL Models Using Entity Framework for .NET Core


When i am updating my DBContext with below command..

Scaffold-DbContext "Server=MySERVER;Database=SSTEST;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DBContext/DBModels

Then DBContext create in ASP.NET Core Web Application by default. I am using my DAL Separate Class Library and want to update DBContext under DAL instead of main project application.

Find PrintScreen

Required DBContext Like..


Solution

  • You will have to select Default project in the Console where you are running the command