title: How does MVC/Razor engine find a view from a model?
body: <p>Given that we have a controller method returning a ViewResult with just a model object, how does the MVC or Razor engine go on to find which View to use, <em>given only the ViewResult</em>? 
  e.g.</p>
  
  <pre><code>    public ActionResult Index()
      {
          return View( db.Persons.ToList());
      }
  </code></pre>
  
  <p>Edit: In other words, once this method has returned all the engine has to go on is a ViewResult. Anything it would use to find a view must be stored in this ViewResult.</p>
  
  <p>Does it use the binding in the top of cshtml file? </p>
  
  <pre><code>    @model IEnumerable&lt;Database.Models.Person&gt;
  </code></pre>
  
  <p>Or does it use the string name of the model class and look it up via routing?</p>
  
  <p>Or does it actually remember which controller called the View() method, and base it on that?</p>
  
  <p>Or something else?</p>
  
  <p>Sorry if this is an obvious question. I have read a lot of Stackoverflow questions and other pages and can't find which way is used... I see a lot of talk about how URLs are mapped to controllers but that's not the part I'm interested in. </p>