❔ Ef core multiple projects
Why i cannot create migration with
dotnet ef migrations add init
15 Replies
i want my migrations to inside of Data
What directory are you running the command from?
If from
WebApiTemplate.Data
, I think you'll need to specify WebApiTemplate.Application
as your startup projectYes, ef commands have two project switches; target project and startup project
Target should be where you want the migration to be, and startup should be the one that does the host builder and Di setup
when i run from application
it still gives error about something like
specify migration project to "application" not data
"run from application"?
application dir
ah you mean rgis
pay extra attention to
-p
and -s
okey
I'll try
thanks
you will most likely want
-p
to be your "data" or "persistance" project
and -s
to be your api/application projectI'll try thanks
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.