title: how to make View of create type with two model
body: <p>I have a view bind with two models ...so I choose <code>ViewModel</code> method to bind two models with a view ...but I am facing problem to create a view of <code>Create</code> type  ...but I am facing error ...FeedbackMix is ViewModel here...I have to pass query object for displaying something in the layout at the same time I have to make Create type view page ...<br>
  <strong>ERROR:</strong></p>
  
  <blockquote>
    <p>CS1061: 'FeedbackMixModel' does not contain a definition for 'Message' and no extension method 'Message' accepting a first argument of type 'FeedbackMixModel' could be found (are you missing a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>Controller</p>
  
  <pre><code>public ActionResult Create()
  {
     var msg= db.Messages.ToList();
      var feed = db.Feedbacks.ToList();
      FeedbackMixModel vm = new FeedbackMixModel();
      vm.allfeedbacks = feed;
     //this is also create type view 
      return View(vm);
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code>@model WebApplication5.Models.FeedbackMixModel
  ....
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
      @Html.ValidationSummary(true, "", new { @class = "text-danger" })
      ....
      @Html.LabelFor(model =&gt; model.Message, htmlAttributes: new { @class = "control-label col-md-2" })
      &lt;div class="col-md-10"&gt;
          @Html.EditorFor(model =&gt; model.Message, new { htmlAttributes = new { @class = "form-control" } })
         @Html.ValidationMessageFor(model =&gt; model.Message, "", new { @class = "text-danger" })
      &lt;/div&gt;
      ....
  }
  </code></pre>
  
  <p>ViewModel</p>
  
  <pre><code>public class FeedbackMixModel
  {
      public List&lt;UserManager&gt; allUserManagers { get; set; }
      public List&lt;Feedback&gt; allfeedbacks { get; set; }
      public List&lt;Package&gt; allpackages { get; set; }
      public List&lt;Messages&gt; allmessages { get; set; }
  }
  </code></pre>
  
  <p><strong>ERROR LINE</strong></p>
  
  <blockquote>
    <p>Line 16: @Html.LabelFor(model => model.Message, htmlAttributes: new { @class = "control-label col-md-2" })</p>
  </blockquote>