Trying to add a controller from my EF model, not sure what I’m doing wrong.
I created a model from my database, but when I try add a controller I get an error:
“Unable to retrieve metadata for “JobsApp.Category”. Unable to determine the principal end of an association between the types “JobsApp.Job” and “JobsApp.Category”. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.”….
It looks like you have some problems with your model classes – you’re going to need to solve those first.
A question (and answer) about the “principal end of this association must be explicitly configured using either the relationship fluent API or data annotations” exception you’re seeing is on SO.