Пример #1
0
 public IResult Update(Comment comment)
 {
     _validation = new Validation <CommentValidator>();
     _validation.Validate(comment);
     _commentDal.Update(comment);
     return(new SuccessResult());
 }
Пример #2
0
 public bool Update(Comment model)
 {
     try
     {
         return(commentDal.Update(model));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
        public bool Update(Comment comment)
        {
            bool result = _commentDal.Update(comment);

            if (result)
            {
                return(true);
            }

            return(false);
        }
Пример #4
0
 public IResult Update(Comment comment)
 {
     try
     {
         _commentDal.Update(comment);
         return(new SuccessResult(Messages.SuccessUpdated));
     }
     catch (Exception)
     {
         return(new ErrorResult(Messages.ErrorUpdated));
     }
 }
 public EntityResult Update(Comment model)
 {
     try
     {
         if (_commentDal.Update(model))
         {
             return(new EntityResult("Başarılı", ResultState.Success));
         }
         return(new EntityResult("Hata Oluştu", ResultState.Warning));
     }
     catch (Exception ex)
     {
         return(new EntityResult("DataBase Hatası", ResultState.Error));
     }
 }
Пример #6
0
        public IResult Update(Comment comment)
        {
            IResult result = BusinessRule.Run
                             (
                CheckIfCommentExist(comment.Id)
                             );

            if (result != null)
            {
                return(result);
            }

            _commentDal.Update(comment);

            return(new SuccessResult());
        }
Пример #7
0
        public DataResponse Update(Comment entity)
        {
            var comment = _commentDal.Update(entity);

            if (comment == null)
            {
                return new DataResponse
                       {
                           Mesaj      = "Yorum Duzenlenemedi",
                           Tamamlandi = false,
                       }
            }
            ;
            return(new DataResponse
            {
                Data = comment,
                Tamamlandi = true,
                Mesaj = comment.YorumBaslik + " Baslikli Yorum Duzenlendi",
            });
        }
Пример #8
0
        public bool UpdateComment(Expression <Func <Comment, bool> > expression)
        {
            try
            {
                var comment = _commentDal.Get(expression);
                if (!comment.IsActive)
                {
                    comment.IsActive = true;
                }
                else
                {
                    comment.IsActive = false;
                }

                _commentDal.Update(comment);
                _commentDal.Save();

                return(true);
            }
            catch (Exception exp)
            {
                return(false);
            }
        }
Пример #9
0
 public IResult Update(Comment entity)
 {
     _commentDal.Update(entity);
     return(new SuccessResult(Messages.CommentUpdated));
 }
 public Comment Update(Comment comment)
 {
     _commentDal.Update(comment);
     return(GetById(comment.CommentId));
 }
 public IResult Update(Comment comment)
 {
     _commentDal.Update(comment);
     return(new SuccessDataResult <Comment>(Messages.Updated));
 }
Пример #12
0
 public bool Update(Comment comment)
 {
     return(_commentDal.Update(comment));
 }
Пример #13
0
 public void Update(Comment comment)
 {
     ValidationTool.Validate(new CommentValidator(), comment);
     commentDal.Update(comment);
 }
 public Comment Update(Comment entity)
 {
     return(_CommentDal.Update(entity));
 }
Пример #15
0
 public void Update(Comments entity)
 {
     _commentDal.Update(entity);
 }
Пример #16
0
 public IResult Update(Comment comment)
 {
     _commentDal.Update(comment);
     return(new SuccessResult());
 }
Пример #17
0
 public void Update(Comment entity)
 {
     commentDal.Update(entity);
 }
 public void Update(Comment commend)
 {
     _commentDal.Update(commend);
 }
Пример #19
0
 public IResult Update(Comment comment)
 {
     _commentDal.Update(comment);
     return(new SuccessResult(Messages.CommnetUpdated));
 }