Asp.Net Core 3.1 Identity Error:InvalidOperationException: Cannot create a DbSet for 'ClassModal' because this type is not included in the model for the context


Question: How do you resolve Error:InvalidOperationException: Cannot create a DbSet for 'ClassModal' because this type is not included in the model for the context?

 

Solution: Look into your application and find ApplicationDbContext and add the code below.

  public class ApplicationDbContext : IdentityDbContext<InsertYourIdentityClassModal>
    {
        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
            : base(options)
        {
        }
    }





For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email AddressContact: [email protected]