title: MVC NotMapped attribute EditorFor returning null value in Edit.cshtml but not Create.cshtml
body: <p>This question relates to a Visual Studio 2013, Asp.net MVC-5.2.2 project:</p>
  
  <p>I have a NotMapped string attribute in my class:</p>
  
  <pre><code>    [NotMapped]
      public string myNotMappedAttribute{ get; set; }
  </code></pre>
  
  <p>I use this attribute, which is not mapped in the original table of the Controller, to fill a column in a different table that has a foreign key relationship with the Controller's table under consideration. Again, this idea works perfectly in Create, but not edit.</p>
  
  <p>I have an MVC EditorFor box that works in the Create.cshtml (razor) as follows:</p>
  
  <pre><code>    &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.myNotMappedAttribute)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.myNotMappedAttribute)
          @Html.ValidationMessageFor(model =&gt; model.myNotMappedAttribute)
      &lt;/div&gt;
  </code></pre>
  
  <p>However, the exact same razor code returns null when used in the Edit.cshtml file.  </p>
  
  <p>In the Edit post-back method of the controller, this attribute (and only this attribute) is null the other attributes have the correct values.  I even moved this attribute so it wouldn't be the last attribute, and one after it was correct.   </p>
  
  <p>Any ideas as to why this would work in Create and not Edit?  </p>