예제 #1
0
        public IResult Add(Comment entity)
        {
            //Check(entity);
            FluentValidationTool.Validate(new CommentValidator(), entity);

            commentDAL.Add(entity);
            return(new SuccessResult(ResultMessage <Comment> .Add(entity.ToString())));
        }
예제 #2
0
        public IActionResult Add(Comment entity)
        {
            Comment added = _CommentDal.Add(entity);

            if (added != null && added.Id > 0)
            {
                return(Ok(added));
            }
            else
            {
                return(BadRequest("Ekleme işlemi başarısız oldu!"));
            }
        }
 public void Insert(Comment entity)
 {
     _dal.Add(entity);
 }
 public bool Add(Comment model)
 {
     return(_commentDAL.Add(model) > 0);
 }
예제 #5
0
 public IResult AddComment(Comment comment)
 {
     _commentDAL.Add(comment);
     return(new SuccessResult(Messages.AddedComment));
 }
예제 #6
0
 public bool Add(Comment entity)
 {
     return(_commentDAL.Add(entity) > 0);
 }
예제 #7
0
 public void Insert(Comment entity)
 {
     _commentDAL.Add(entity);
 }