Entityframework.docs: Adding migrations with startup in different project -

Created on 20 Sep 2018  Â·  5Comments  Â·  Source: dotnet/EntityFramework.Docs

Please can support be added for adding migrations with dotnet-ef when the startup.cs is in a different project to the DbContext.

https://stackoverflow.com/questions/38705694/add-migration-with-different-assembly helped me.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

closed-duplicate

Most helpful comment

dotnet ef migrations add --startup-project ./ProjectWithStartup/ --project ./ProjectWithDbContext/

All 5 comments

dotnet ef migrations add --startup-project ./ProjectWithStartup/ --project ./ProjectWithDbContext/

The Using a Separate Project article is about adding migrations to a project that doesn't contain your DbContext. Having Startup in a separate project is mentioned a few places throughout the docs.

@bricelam do you think this issue should be closed then?

It might be worth mentioning the startup project again on this page.

Duplicate of ##933

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qidydl picture qidydl  Â·  4Comments

CubeSpark picture CubeSpark  Â·  3Comments

davidliang2008 picture davidliang2008  Â·  4Comments

jpeckham picture jpeckham  Â·  3Comments

ajcvickers picture ajcvickers  Â·  4Comments