Пример #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);
 }