Reputation: 13
I keep getting this error, as showing in the screenshot below when I try adding a controller. Any help in regards to resolving this error will be greatly appreciated.
http://i693.photobucket.com/albums/vv293/saturobi360/Error/API_error_zpswocovwbw.jpg
Upvotes: 0
Views: 86
Reputation: 1697
The error stated that those entities (e.g. Firearm
, FirearmDescription
) have no key defined.
I can see you defined itemID
. However, by convention this will not be used as the primary key unless you either
Rename the field to FirearmId
or,
Add a [Key]
attribute as below:
[Key]
public int itemID {get; set;}
You may learn more about the convention here: https://msdn.microsoft.com/en-us/data/jj591583.aspx#Key
Upvotes: 1