please try:
add-migration CreateIdentitySchema -Context WebApplication1Context
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Having difficulty with the Add-Migration CreateIdentitySchema step in the tutorial. Any help would be appreciated:
Directions
PowerShellCopy
Install-Package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore
Add-Migration CreateIdentitySchema
Update-Database
First attempt
PM> add-migration CreateIdentitySchema
Build started...
Build succeeded.
More than one DbContext was found. Specify which one to use. Use the '-Context' parameter for PowerShell commands and the '--context' parameter for dotnet commands.
There are two Context files:
projectname.data.ApplicationDbContext
projectname.areas.identity.data.WebApplication1Context
My assumption is that it is the second context file - in the areas.identity.data folder - that I'm targeting since the tutorial is authorization.
Second Attempt
PM> add-migration CreateIdentitySchema -Context Areas\Identity\Data\
Build started...
Build succeeded.
No DbContext named 'Areas\Identity\Data' was found.
PM> add-migration CreateIdentitySchema -Context Areas\Identity\Data\WebApplication1Context.cs
Build started...
Build succeeded.
No DbContext named 'Areas\Identity\Data\WebApplication1Context.cs' was found.
PM> add-migration CreateIdentitySchema -Context WebApplication1Context.cs
Build started...
Build succeeded.
No DbContext named 'WebApplication1Context.cs' was found.
please try:
add-migration CreateIdentitySchema -Context WebApplication1Context