I’m having the same issue. I followed your steps but when I get to the last step of enable-migrations -contextypename ApplicationDB Context I get…
PM> enable-migrations -contexttypename ApplicationDbContext
The context type ‘ApplicationDbContext’ was not found in the assembly ‘2VidlyEx1’.
From the Tools menu, choose NuGet Package Manager , and then choose Package Manager Console .
In the Package Manager Console window, enter the following command:
Install-Package EntityFramework
3.Create the DbContext
in the models folder add a class called ApplicationDbContext paste in the following:
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
namespace Vidly.Models
{
public class ApplicationDbContext:DbContext
{
public DbSet Movies { get; set; }
public DbSet Customers { get; set; }
}
4. From the Tools menu, select NuGet Package Manager > Package Manager Console .
At the PM> prompt enter the following commands:```
enable-migrations
add-migration InitialCreate
Best wishes as the tutorial is missing key instructions. Very disappointing.
Ok after doing all this the reason it didn’t work initially is because I did not change the Authentication to Individual User Accounts when creating the project. If you do this you won’t have the issue I had. See here for more info. ASP.Net Identity on Visual Studio 2019 - ASP.NET MVC - Code with Mosh Forum
Then I had to use nuget to add references to Microsoft.AspNet.Identity.Core, Microsoft.AspNet.Identity.Owin, and Microsoft.AspNet.Identity.EntityFramework