public static async Task <Comment> Update(Comment comment, Account account)
        {
            var commentInDatabase = Get(comment.Id);

            if (!commentInDatabase.IsOwner(account))
            {
                throw new Error403Forbidden <Comment>("Bạn không có quyền chỉnh sửa bình luận này");
            }

            CheckValid(comment);

            return(await CommentDataAccess.Update(commentInDatabase, comment));
        }
Exemple #2
0
 public void Update(Comment comment)
 {
     _commentDal.Update(comment);
 }