ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Multiple objects sets per type are not supported

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; }