I am not sure why I am getting this error message. I have a primary key defined in my sql database for it. Here is my code:
[HttpPost] public ActionResult
Which field is your key? Whichever it is - ProfileId or UserId - either change the name to MyProfileId or Id or else put a [Key] attribute on it.