public async Task <IResult> Update(CommentForAddUpdateDto dto) { var isCommentExists = await _commentDal.GetAsync(c => c.Id == dto.Id); if (isCommentExists == null) { return(new ErrorResult(Messages.CommentNotFound)); } await _commentDal.UpdateAsync(dto.Map(isCommentExists)); return(new SuccessResult(Messages.UpdatedSuccessfully)); }
public async Task <IResult> UpdateAsync(Comment entity) { await _commentDal.UpdateAsync(entity); return(new SuccessResult()); }