Yogesh Vedpathak

Yogesh Vedpathak

  • 674
  • 1.4k
  • 191.6k

Multiple object sets per type are not supported. The object

May 22 2018 4:42 AM

Multiple object sets per type are not supported. The object sets 'IdentityUsers' and 'users' can both contain instances of type 'Practices.Models.User'.

 
This is my context File
 
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
namespace Practices.Models
{
public class ApplicationDbContext: DbContext
{
public ApplicationDbContext(): base("Context")
{
}
// public System.Data.Entity.DbSet<Practices.Models.User> IdentityUsers { get; set; }
public DbSet<User> users { get;set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
}
}
}