paburgos
paburgos

Reputation: 309

Entity Framework 7 -The entity type 'object' requires a key to be defined

I am getting this error when migrating in EF 7

Microsoft.Data.Entity.Metadata.ModelItemNotFoundException: The entity type 'object' requires a key to be defined.

I am not sure what I am doing wrong. This is the dependencies I am using on project.json

Upvotes: 2

Views: 1923

Answers (1)

Sirwan Afifi
Sirwan Afifi

Reputation: 10824

Most likely you're using some Data annotations that are not yet supported so you will need to use the Fluent API for configuration.

https://github.com/aspnet/EntityFramework/issues/1913

Using [ComplexType] in Entity Framework Core

Upvotes: 3

Related Questions