title: Entity Framework, EntityCommandExecutionExeption
body: <p>Using Simple Membership provider.... and a User view ( that passes UserID into ) Userroles Controller </p>
  
  <p>My Index ( of UserRoles ) ( the ID is UserID from ActionLink in the View from User Controller)</p>
  
  <pre><code>    public ActionResult Index([Bind(Prefix = "id")] int id)
      {
          var usr = db.UserRoles.Find(id);
  
          if (usr != null)
          {
              return View(usr);
          }
  
          return View();
          //return View(db.UserRoles.ToList());
      }
  </code></pre>
  
  <p>But my model is </p>
  
  <pre><code>[Table("webpages_UsersInRoles")]
  public class UserRoles
  {
      [Key]
      [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
      public int UserId { get; set; }
      public int RoleID { get; set; }
  
  }
  </code></pre>
  
  <p>Error 
  <img src="https://i.stack.imgur.com/rEYH7.png" alt="enter image description here"></p>
  
  <p>Thanks</p>
  
  <p>In other words, It shouldnt even be lookingfor UserProfiles_UserID.....?</p>
  
  <p>Also i do get this : 
  Stack Trace:</p>
  
  <pre><code> [SqlException (0x80131904): Invalid column name 'UserProfiles_UserId'.
   Invalid column name 'UserProfiles_UserId'.
  </code></pre>
  
  <p>Nor my Database or my Model have this field in it ;/ im confused on why its looking for it?</p>