2

I run command for get DBContext and Models from existing database

Scaffold-DbContext -Force -OutputDir "../Project.Domain/Models" -ContextDir "../Project.Data" -Connection "Server=.;Database=xxx;user id=zzz;password=yyy;" -Provider "Microsoft.EntityFrameworkCore.SqlServer"

Now proble is that DBContext at Project.Data file does not have reference to Project.Domain/Models and I need add it by hand (SO generating code always break my code).. Is there way to get that "using Project.Domain.Models" automatically for DBContext file?

DJV
  • 21
  • 4

0 Answers0