예제 #1
0
파일: Mappers.cs 프로젝트: AmiraSh/WebSite
 public static DisplayCommentViewModel MapToDisplayComment(Comment comment, string userName)
 {
     DisplayCommentViewModel commentVM = new DisplayCommentViewModel();
     commentVM.Id = comment.Id;
     commentVM.Text = comment.Text;
     commentVM.Likes = comment.Likes;
     commentVM.DisLikes = comment.DisLikes;
     commentVM.CanDelete = false;
     commentVM.UserName = userName;
     return commentVM;
 }
예제 #2
0
파일: Mappers.cs 프로젝트: AmiraSh/WebSite
 public static DisplayCommentViewModel MapToDisplayComment(Comment comment, string userName, bool canDelete)
 {
     DisplayCommentViewModel commentVM = MapToDisplayComment(comment, userName);
     commentVM.CanDelete = canDelete;
     return commentVM;
 }