internal object DeleteComment(int id, string userInfoId) { _repo.GetOneById(id); _repo.DeleteComment(id, userInfoId); string deleted = "Comment Deleted"; return(deleted); }
public void DeleComment() { try { int commmentId = this.view.CommentId; commentsRepository.DeleteComment(commmentId); commentsRepository.Save(); LoadViewComments(); this.view.CommentId = 0; } catch (Exception ex) { this.view.OnError(ex.Message); } }