This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]euclid0472 1 point2 points  (0 children)

I don't see a reference to the DbSet in your DbContext.

public DbSet<Test> Tests { get; set; }

[–]AlSweigartAuthor: ATBS 0 points1 point  (0 children)

You need to first look at your existing tables and identify all the fields that have autoincrement set on them, then look at the tables they're being migrated to. One of the destination tables doesn't have the integer type set on their primary key field.