❔ Entity framework migration problem
I have problem with creating the migration. I get this error "The seed entity for entity type 'Author' with the key value 'Id:1' cannot be added because it has the navigation 'Country' set. To seed relationships, add the entity seed to 'Author' and specify the foreign key values {'CountryId'}."
I still get this error even with I think all entities connected in right way. I add link to pastebin, because code is too long.
https://pastebin.com/sxePEFLW
Pastebin
// Authorusing System.ComponentModel.DataAnnotations;using System.C...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
2 Replies