Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Does anyone know how to change the output directory of the following command?

dotnet ef  migrations add Initial --context EsportshubApi.Models.ApplicationDbContext

I tried to add the option:

--content-root-path 'Migrations/Identity' 

But that doesn't do anything. There is a --data-dir option as well and something else with directory. But none of them is the output for migrations.

My problem is that I have 2 DbContexts so I want their migrations to be separated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
778 views
Welcome To Ask or Share your Answers For Others

1 Answer

dotnet ef migrations add Initial --context EsportshubApi.Models.ApplicationDbContext -o YourFolderPath

dotnet ef migrations add

Adds a new migration.

Arguments:

Argument Description
<NAME> The name of the migration.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...