public PartialViewResult GetComments(int postId) { List <Comment> Comments = sp.GetComments(); IEnumerable <CommentsVM> comments = Comments.Where(c => c.Post.PostID == postId) .Select(c => new CommentsVM { ComID = c.ComID, CommentedDate = c.CommentedDate.Value, CommentMsg = c.CommentMsg, Users = new UserVM { UserID = 1, Username = c.User.firstName, //imageProfile = c.User.ImageName } }).ToList(); return(PartialView("~/Views/Shared/_MyComments.cshtml", comments)); }