My solution was, after creating the DB using CodeFirst, I used the context.Database.ExecuteSqlRaw method to create a temporary table with the same structure without a primary key, then I deleted the original table and renamed the new table and that was it.