public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
{
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public DbSet<CardModel> Cards { get; set; }
public DbSet<Banners> Banner { get; set; }
public DbSet<Category> Category { get; set; }
public ApplicationDbContext()
: base("DbConnection", throwIfV1Schema: false)
{
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
public System.Data.Entity.DbSet<E_Commerce.Models.ApplicationUser> ApplicationUsers { get; set; }
}
Asked
Active
Viewed 12 times
0

marc_s
- 732,580
- 175
- 1,330
- 1,459

sulaiman Farooqi
- 1
- 2
-
this occurs after i tried to create a api controller after scaffolding this error occurs tried many solution on the internet but not resolved – sulaiman Farooqi Sep 15 '21 at 07:03
-
`DbSet
ApplicationUsers` is redundant as `IdentityDbContext – Jeremy Lakeman Sep 15 '21 at 07:20` already defines this `DbSet`.