public ChatPreviewViewModel(Message lastReceivedMessage, Message lastSentMessage, AspNetUser friend)
 {
     name        = friend.Profile.firstname + " " + friend.Profile.lastname;
     friend_id   = friend.Id;
     profilePath = friend.Profile.Albums.Where(x => x.name.Equals("ProfileAlbum")).FirstOrDefault().Pictures.OrderByDescending(x => x.date).FirstOrDefault().path;
     if (lastReceivedMessage != null && lastSentMessage != null)
     {
         if (lastReceivedMessage.date > lastSentMessage.date)
         {
             lastMessage = lastReceivedMessage;
         }
         else
         {
             lastMessage = lastSentMessage;
         }
     }
     else if (lastSentMessage != null)
     {
         lastMessage = lastSentMessage;
     }
     else if (lastReceivedMessage != null)
     {
         lastMessage = lastReceivedMessage;
     }
     else
     {
         lastMessage = null;
     }
 }
 public MessengerViewModel(AspNetUser user)
 {
     setUserList(user);
 }