How to change the output folder for migrations with asp.net Core?

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.

Options:

Option Short Description
--output-dir <PATH> -o The directory used to output the files. Paths are relative to the target project directory. Defaults to “Migrations”.
--namespace <NAMESPACE> -n The namespace to use for the generated classes. Defaults to generated from the output directory. Added in EF Core 5.0.

Also here are the common options you can use with this command.

Source

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)