title: ASP.net MVC one controller two different strongly typed VIews
body: <p>I want smth. like this. When user types mydomain.com/Message/  he gets all his message threads, but when he types mydomain.com/Message/John he gets message thread between him and john. I Don't know how to implement view for this here is controller : </p>
  
  <pre><code> public ActionResult Index(String userName)
      {
          var user = UserRepository.GetUserByDisplayName(userName);
  
  
          if (user == null || user.UserId.Equals(WebSecurity.CurrentUserId))
          {
              IQueryable&lt;MessageThread&gt; messageThreads =
              MessageThreadRepository.GetMessageThreadsForUser(WebSecurity.CurrentUserId);
              return View(messageThreads);
          }
  
          MessageThread thread = MessageThreadRepository.GetThreadBetweenUsers(WebSecurity.CurrentUserId, userName);
          return View(thread);
      }
  </code></pre>