title: MVC 5 using multiple models in one view asynchronous
body: <p>I want to use two models in one view and call them separately (not together)... I have already tried using view models but it didn't work... I have two models student and teacher, I want to access student on page load and teacher while I click on a button...</p>
  
  <pre><code>ViewModel mymodel = new ViewModel();
  mymodel.Teachers = GetTeachers();
  mymodel.Students = GetStudents();
  return View(mymodel);// This works
  
  //But if I remove mymodel.Students = GetStudents(); then it gives error
  ViewModel mymodel = new ViewModel();
  mymodel.Teachers = GetTeachers();
  return View(mymodel);
  </code></pre>
  
  <p>How can I do it?  </p>