ASP.NET Core 2.1 - IdentityUser Issue - Cannot create a DbSet for 'IdentityUser' this type is not included in the model for the context

Try changing public partial class ApplicationDbContext : IdentityDbContext<ApplicationUser> to public partial class ApplicationDbContext : IdentityDbContext<IdentityUser>

Compiler will generate DbSet with the type provided to generic IdentityDbContext<TUser> class.


From Your startup.cs change

services.AddDefaultIdentity<IdentityUser>()

To

services.AddDefaultIdentity<ApplicationUser>()

As a follow up: to avoid the next possible issue as soon as this here is fixed: You also have to change the types in the Views\Shared_LoginPartial.cshtml

From

@inject SignInManager<IdentityUser> SignInManager
@inject UserManager<IdentityUser> UserManager

To

@inject SignInManager<ApplicationUser> SignInManager
@inject UserManager<ApplicationUser> UserManager