title: ViewModels with SelectList Design Decison
body: <p>I have created a viewmodel</p>
  
  <pre><code>public VMPosition
  {
          public VMPosition(){}//for model binder  
          public VMPosition(int EmployeeID)
          {
              PositionStatusList = new SelectList(_repo.getStatuses);
              //populate other properties
          }
          public int CurrentPositionID { get; set; }
          public int EmployeeID { get; set; }
          public int CurrentPositionHistoryID { get; set; }
          public bool AddingNew { get; set; }
          public bool ClosingCurrent { get; set; }
          public string CurrentPosition { get; set; }
          public DateTime CurrentPositionStartDate { get; set; }
          public string ReasonForDeparture { get; set; }
          public SelectList PositionStatusList { get; set; }
  
  }
  </code></pre>
  
  <p>My GET ActionResult is defined as</p>
  
  <pre><code>public ActionResult UpdatePosition(int id)
  {
       return View(new VMPosition(id)); 
  } 
  </code></pre>
  
  <p>My POST actionresult is defined as</p>
  
  <pre><code> public ActionResult UpdatePosition(int id, VMPosition Position)
      {
          if(ModelState.IsValid){
               Position Current = new Position{Position.Title etc..}
               //save to db
               return redirectToAction("someAction");
           }
           return View(Position);//here is the problem
      }
  </code></pre>
  
  <p>My SelectList is populated in a constructor that accepts one parameter. Modelbinder cannot and should not call the constructor if the modelstate is invalid. I will have to return the View with model object (which in this case don't contain SelectList value). How can handle this scenario when using view Models.</p>
  
  <p>I can manually populate these values in actionresult but that will violate the DRY principle. However, for the purposes of this question, I'd like help addressing the bigger design question.</p>