public List <PostProfileModel> getCurrentPost(string userID) { List <Post> listCurrentPost = postDao.getCurrentUserPost(userID); PostProfileModel postProfileModel; List <PostProfileModel> listPostProfileModel = new List <PostProfileModel>(); foreach (Post post in listCurrentPost) { postProfileModel = new PostProfileModel() { id = post.id, uid = post.uid, image = post.image, time = post.time, content = post.content }; listPostProfileModel.Add(postProfileModel); } return(listPostProfileModel); }