ASP.NET Identity - Multiple object sets per type are not supported

后端 未结 4 666
栀梦
栀梦 2020-11-27 17:46

I got an error using ASP.NET Identity in my app.

Multiple object sets per type are not supported. The object sets \'Identity Users\' and \'Users\'

4条回答
  •  猫巷女王i
    2020-11-27 18:04

    You do have two DbSets` of the same type.

    IdentityDbContext itself contains Users property declared as:

    public DbSet Users { get; set; }
    

    You're declaring second one in your class.

提交回复
热议问题