Home

ModelValidationException: One or more validation errors were detected during model generation

Late last year I was hapily using LinqPad with our EF Assembly. Then after an update to LinqPad I get these sorts of error:

ModelValidationException: One or more validation errors were detected during model generation:
CodeFirstNamespace.BrandAlia: : EntityType 'BrandAlia' has no key defined. Define the key for this EntityType.
CodeFirstNamespace.ClientTermsCondition: : EntityType 'ClientTermsCondition' has no key defined. Define the key for this EntityType.
BrandAlias: EntityType: EntitySet 'BrandAlias' is based on type 'BrandAlia' that has no keys defined.
ClientTermsConditions: EntityType: EntitySet 'ClientTermsConditions' is based on type 'ClientTermsCondition' that has no keys defined.

These happen on all tables that have a Composite Key.

I can fix the issue by adding Order attributes but dont get why when it works fine in our app and had worked perfectly fine in LinqPad previously.

Any thoughts?
Sign In or Register to comment.