C#C
C#10mo ago
Kasumi

Unable to create a 'DbContext' of type ''. The exception 'The entity type 'SelectListGroup' requires

Hello,
everytime I want to create a migration I get this Error:

Unable to create a 'DbContext' of type ''. The exception 'The entity type 'SelectListGroup' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728


The funny thing is, I dont hae anywhere "SelectListGroup" defined like its nowhere.

Can someone help me there?

https://paste.mod.gg/pdgbqxsiwibr/2
A tool for sharing your source code with the world!
Was this page helpful?