title: What is Alternate of Providing View-model for Join Query in mvc5
body: <p>I am Passing Different Model in a single View by Using a View model 'UserinfoVieModel'
  The Syntax of my controller is</p>
  
  <pre><code> select new UserInfoViewModel
               {
                 UserInfoID = user.UserInfoID,
                 AvatarURL = user.AvatarURL,
                 UserFullName = user.UserFullName,
                 ThreadSnippet = c.ThreadSnippet,
                 MessageStarterUserId = c.MessageStarterUserId,
                 MultipleReceiversId = c.MultipleReceiversId,
                 LastMessageTime = c.LastMessageTime
                }
  </code></pre>
  
  <p>What My area of Concern is that when i am passing This model i am getting all blank data from all the classes which i have described in UserinfoVieModel</p>
  
  <pre><code>public class UserInfoViewModel
      {
          public virtual string Id { get; set; }
          public Guid UserInfoID { get; set; }
          public string UserName { get; set; }
          public string UserID { get; set; } 
          public String DbType { get; set; }
          public Guid UserLevelEnumId { get; set; }
          public string FirstName { get; set; }
          public string MiddleName { get; set; }
          public string LastName { get; set; }
          public DateTime Birthdate { get; set; }
          public string Gender { get; set; }//male/female/unknown
          public string Email { get; set; }
          public string MobileNo { get; set; }
          public string Country { get; set; }
          public int Zipcode { get; set; }
          public string Caption { get; set; }
          public int CountFollowers { get; set; }
          public int CountFollows { get; set; }
          public int CountFiles { get; set; }
          public int CountPhotos { get; set; }
  
  \\ and many other Attributes
  }
  </code></pre>
  
  <p>So Please tell me some method so that My linq query Performance increases by receiving specific data which  i want .</p>
  
  <p>This is my Action Method</p>
  
  <pre><code> var searchMessageThread = from c in db.MessageThreads 
                                        where c.MessageStarterUserId == loginUserId &amp;&amp; c.isGroup == false
                                        join user in db.UserInfos
                                        on c.MultipleReceiversId equals user.UserInfoID
                                        select new UserInfoViewModel
                                        {
                                            UserInfoID = user.UserInfoID,
                                            AvatarURL = user.AvatarURL,
                                            UserFullName = user.UserFullName,
                                            ThreadSnippet = c.ThreadSnippet,
                                            MessageStarterUserId = c.MessageStarterUserId,
                                            MultipleReceiversId = c.MultipleReceiversId,
                                            LastMessageTime = c.LastMessageTime
                                        }
                                        ;
              return PartialView("_GetThread", searchMessageThread.OrderByDescending(s =&gt; s.LastMessageTime).ToList());
  </code></pre>