title: How to hide primary key input field using editorfor
body: <p>Hi I'm using Editorfor() to make a little form that submits view model to the controller.  Editorfor() nicely prints input fields of the model but it also prints primary key field. So I want to hide primary key field.</p>
  
  <pre><code>@Html.EditorFor(m=&gt;m.viewmodel)
  </code></pre>
  
  <p>this is markup that I have.</p>
  
  <pre><code>@Html.HiddenFor(m =&gt; m.viewmodel.Id);
  @Html.EditorFor(m=&gt;m.viewmodel)
  </code></pre>
  
  <p>have tried this but does not work. and I wanted to make an approach directly to the model but I'm using EF Designer, so I'm not sure where to begin. Please give me an advice.</p>