title: Get [key] property from ViewModel
body: <p>I have a ViewModel which has a <code>[key]</code> property and i would like to get that from an instance of that view model.</p>
  
  <p>My code looks something like this (fictional models)</p>
  
  <pre><code>class AddressViewModel
  {
      [Key]
      [ScaffoldColumn(false)]
      public int UserID { get; set; } // Foreignkey to UserViewModel
  }
  
  // ... somewhere else i do:
  var addressModel = new AddressViewModel();
  addressModel.HowToGetTheKey..??
  </code></pre>
  
  <p>So i need to get the <code>UserID</code>(in this case) from the ViewModel. How can i do this?</p>