ict.ken.be

 

Multiple objects sets per type are not supported

Related Posts

Categories: EF

You copy and pasted a DbSet and then you forget to rename the type...

This error occurs if your DbContext class exposes multiple DbSet<T> properties where T occurs more than once. Entitfy framework is not able to figure out which DbSet an instance of type T belongs to.

public DbSet<Course> Courses { get; set; }
public DbSet<Course> Chapters { get; set; }