public async Task <IResult> Delete(CommentForDeleteDto dto) { var isCommentExists = await _commentDal.GetAsync(c => c.Id == dto.Id); if (isCommentExists == null) { return(new ErrorResult(Messages.CommentNotFound)); } await _commentDal.DeleteAsync(isCommentExists); return(new SuccessResult(Messages.DeletedSuccessfully)); }
public async Task <IResult> DeleteAsync(Comment entity) { await _commentDal.DeleteAsync(entity); return(new SuccessResult()); }