public IResult Add(Comment comment) { _validation = new Validation <CommentValidator>(); _validation.Validate(comment); _commentDal.Add(comment); return(new SuccessDataResult <Comment>(comment)); }
public void AddComment(Comment comment) { comment.UserId = _customUserService.GetCurrentUser().Id; comment.CommentDate = DateTime.Now; comment.IsActive = true; _commentDal.Add(comment); //Repository'ye gideceğiz.. _commentDal.Save(); }
public bool Add(Comment comment) { bool result = _commentDal.Add(comment); if (result) { return(true); } return(false); }
public IResult Add(Comment comment) { try { _commentDal.Add(comment); return(new SuccessResult(Messages.SuccessAdded)); } catch (Exception) { return(new ErrorResult(Messages.ErrorAdded)); } }
public IResult Add(Comment comment) { try { comment.CommentDate = DateTime.Now; _commentDal.Add(comment); return(new SuccessResult()); } catch (Exception) { return(new ErrorResult(Messages.ErrorWhileAddingEntity)); } }
public async Task <ActionResult <Comment> > PostComment(Comment comment) { if (comment == null) { return(BadRequest()); } comment.PublishDate = DateTime.Now; await _commentDal.Add(comment); return(CreatedAtAction("GetComment", new { id = comment.Id }, comment)); }
public async Task <IResult> Add(CommentCreateDto commentCreateDto) { var comment = new Comment { Content = commentCreateDto.Content, UserId = commentCreateDto.UserId, ProductId = commentCreateDto.ProductId, Created = DateTime.Now }; await _commentDal.Add(comment); return(new SuccessResult(Messages.CommentAdded)); }
public void Add(Comment comment) { _commentDal.Add(comment); try { _emailProvider.Subject = "YKK Data Sheet Bildirimi Hk."; _emailProvider.toAddress = GetToAddress(comment); _emailProvider.Content = GetContent(comment); _emailProvider.SendMail(); } catch { } }
public IResult Add(CommentCreateDto commentCreateDto)//+++ { var comment = new Comment { Content = commentCreateDto.Content, UserId = commentCreateDto.UserId, PostId = commentCreateDto.PostId, //Created = Convert.ToDateTime(commentCreateDto.Created) Created = DateTime.Now }; _commentDal.Add(comment); return(new SuccessResult(Messages.CommentAdded)); }
public IResult Add(Comment comment) { IResult result = BusinessRule.Run ( CheckIfCommentAlreadyExist(comment.Id) ); if (result != null) { return(result); } _commentDal.Add(comment); return(new SuccessResult()); }
public DataResponse Add(Comment entity) { var comment = _commentDal.Add(entity); if (comment == null) { return new DataResponse { Mesaj = "Yorum Eklenemedi", Tamamlandi = false, } } ; return(new DataResponse { Data = comment, Tamamlandi = true, Mesaj = comment.YorumBaslik + " Baslikli Yorum Eklendi", }); }
public void AddComment(CommentDto commentDto) { var addComment = new Comment() { UserId = _customUserService.GetCurrentUser().Id, CommentDate = DateTime.Now, IsActive = true, Content = commentDto.Content, //TODO Kontrol PostId = commentDto.PostId }; _commentDal.Add(addComment); _commentDal.Save(); //commentDto.UserId = _customUserService.GetCurrentUser().Id; //commentDto.CommentDate = DateTime.Now; //commentDto.IsActive = true; //_commentDal.Add(commentDto); //Repository'ye gideceğiz.. //_commentDal.Save(); }
public IResult Add(Comment entity) { _commentDal.Add(entity); return(new SuccessResult(Messages.CommentAdded)); }
public IResult Add(Comment comment) { _commentDal.Add(comment); return(new SuccessResult()); }
public Comment Add(Comment comment) { return(_commentDal.Add(comment)); }
public IResult Add(Comment comment) { comment.Status = false; _commentDal.Add(comment); return(new SuccessResult()); }
public IResult Add(Comment comment) { _commentDal.Add(comment); return(new SuccessDataResult <Comment>(Messages.Added)); }
public void Add(Comments entity) { _commentDal.Add(entity); }
public Comment Add(Comment entity) { return(_CommentDal.Add(entity)); }
public Comment Insert(Comment comment) { _commentDal.Add(comment); return(comment); }
public bool Add(Comment comment) { return(_commentDal.Add(comment)); }
public Comment Add(Comment comment) { _commentDal.Add(comment); return(comment); }
public void Add(Comment comment) { ValidationTool.Validate(new CommentValidator(), comment); commentDal.Add(comment); }
public Comment Insert(Comment comment) { return(_commentDal.Add(comment)); }
public void Add(Comment entity) { commentDal.Add(entity); }
public void Add(Comment commend) { _commentDal.Add(commend); }
public IResult Add(Comment comment) { _commentDal.Add(comment); return(new SuccessResult(Messages.CommnetAdded)); }