title: Bind ViewModel to Controller on Edit Post Action - (with parameterless constructor) getting null
body: <p>As a developer asp.net web site I've created project. And Scaffold it for controller creation with DataBase First approach.</p>
  
  <p>There are two EF data model objects: Personal and PersonalDetails.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  public partial class personalDetails
  {
      public int personID { get; set; }
      public Nullable&lt;bool&gt; rehber { get; set; }
      //many others, removed for easy to understand
  
  }
  
  public partial class personal
  {
      public personal()
      {
          this.passportDetails = new HashSet&lt;passportDetails&gt;();
      }
      public string name { get; set; }
      public string surname { get; set; }
      public int ID { get; set; }
  
      public Nullable&lt;short&gt; politicalPartyID { get; set; }
      public Nullable&lt;short&gt; familyStatusID { get; set; }
  
      public virtual familyStatus familyStatus { get; set; }
      public virtual politicalParties politicalParties { get; set; }
  
  }
  </code></pre>
  
  <p>For a business logic it's necessary to create viewModel, because on view there are some fields from personal and some fields from personalDetils object. And I added viewModel class.</p>
  
  <pre><code> public class SocialViewModels
  {
  
      public personalDetails personalDetails { get; private set; }
  
      public personal personal { get; private set; }
      public SelectList marriageStatus { get; private set; }
  
      public SelectList partyList { get; private set; }
      public SocialViewModels()
      {
  
      }
      public SocialViewModels(personalDetails _personalDetails, personal _personal,  IEnumerable _marriageStatus, IEnumerable _partyList)
      {
          personalDetails = _personalDetails;
          personal=_personal;
          marriageStatus = new SelectList(_marriageStatus, "ID", "familyStatusName", personal.familyStatusID);
          partyList = new SelectList(_partyList, "ID", "partyName", personal.politicalPartyID);
      }
  
  }
  </code></pre>
  
  <p>This ViewModel works well for get Details operation. Controller and View below:</p>
  
  <pre><code>public ActionResult Details(int? id)
      {
          if (id == null)
          {
              return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
          }
          personalDetails personalDetails = db.personalDetails.Find(id);
          SocialViewModels svm = new SocialViewModels(personalDetails, personalDetails.personal, db.familyStatus, db.politicalParties);
  
          if (personalDetails == null)
          {
              return HttpNotFound();
          }
          return View(svm);
      }
  </code></pre>
  
  <p>Details view:</p>
  
  <pre><code> @model kadrws.ViewModels.SocialViewModels
  
  @Html.DisplayFor(model =&gt; model.personal.familyStatus.familyStatusName)
  
  @Html.DisplayFor(model =&gt; model.personal.politicalParties.partyName)
  
  @Html.DisplayFor(model =&gt; model.personalDetails.rehber)
  
  &lt;p&gt;
      @Html.ActionLink("Redaktə et", "Edit", new { id = Model.personal.ID })
  &lt;/p&gt;
  </code></pre>
  
  <p>But problem with Edit post method:</p>
  
  <pre><code> // GET: personalDetails/Edit/5
      public ActionResult Edit(int? id)
      {
          if (id == null)
          {
              return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
          }
          personalDetails personalDetails = db.personalDetails.Find(id);
          SocialViewModels svm = new SocialViewModels(personalDetails, personalDetails.personal, db.familyStatus, db.politicalParties);
  
          if (personalDetails == null)
          {
              return HttpNotFound();
          }
          return View(svm);
  
      }
  
      // POST: personalDetails/Edit/5
      // To protect from overposting attacks, please enable the specific properties you want to bind to, for 
      // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
      [HttpPost]
      [ValidateAntiForgeryToken]
      public ActionResult Edit([Bind(Include = "personID,rehber, partyID, familyStatusID")] SocialViewModels scm )
      {
          if (ModelState.IsValid)
          {
                 //do 
          }
          ViewBag.personID = new SelectList(db.personal, "ID", "name", scm.personal.ID);
          return View(scm);
      }
  </code></pre>
  
  <p>Edit view :</p>
  
  <pre><code>@model kadrws.ViewModels.SocialViewModels
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
  
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      @Html.HiddenFor(model =&gt; model.personalDetails.personID)
  
      @Html.DropDownList("personal_familyStatusID", Model.marriageStatus)
  
      @Html.DropDownList("personal_politicalPartyID", Model.partyList)
  
      @Html.EditorFor(model =&gt; model.personalDetails.rehber)
  
      &lt;input type="submit" value="Save" class="btn btn-default" /&gt;
  
  }
  </code></pre>
  
  <p>Problem is that, SocialViewModels is null. 
  <a href="https://i.stack.imgur.com/cKBam.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cKBam.png" alt="enter image description here"></a></p>
  
  <p>I also search similar behaviors in Google. Dozen this like problems. Please, help to understand where is problem in this code...</p>