public ActionResult _RecentChats() { var recentChats = _userServiceAgent.GetRecentChats(User.Identity.GetUserId()); var objmodel = recentChats.Select(m => new UserViewModel() { UserId = m.UserId, Name = m.Name, ProfilePicture = _defaultHelper.GetProfilePicture(m.ProfilePicture, m.Gender), IsOnline = m.IsOnline, UnReadMessages = m.UnReadMessageCount > 0 ? Convert.ToString(m.UnReadMessageCount) : "" }).ToList(); return(PartialView(objmodel)); }