public async Task <BasexResponse <Comment> > CreateAsync(Comment comment) { try { comment.CreationTime = DateTime.UtcNow; await _commentDal.AddAsync(comment); await _unitOfWork.CompleteAsync(); return(new BasexResponse <Comment>(comment)); } catch (Exception ex) { return(new BasexResponse <Comment>(ex.Message)); } }
public async Task <IResult> AddAsync(Comment entity) { await _commentDal.AddAsync(entity); return(new SuccessResult()); }
public async Task <IResult> Add(CommentForAddUpdateDto dto) { await _commentDal.AddAsync(dto.Map <Comment>()); return(new SuccessResult(Messages.AddedSuccessfully)); }