Пример #1
0
        public IHttpActionResult UpdatePost(ActorViewModel model)
        {
            var response = new SimpleResponse();

            response = iActorBusiness.Update(model);
            return(Json(response));
        }
Пример #2
0
        public IActionResult Put([FromBody] ActorVO item)
        {
            if (item == null)
            {
                return(BadRequest());
            }
            var updatedItem = _business.Update(item);

            if (updatedItem == null)
            {
                return(NoContent());
            }
            return(new OkObjectResult(updatedItem));
        }
Пример #3
0
        public IActionResult UpdatePost(ActorViewModel model)
        {
            var response = iActorBusiness.Update(model);

            if (response.ResponseCode > 0)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                ModelState.AddModelError(string.Empty, response.ResponseMessage);
                return(View("Edit", model));
            }
        }
Пример #4
0
        public SimpleResponse Update(ActorDto dto)
        {
            var response = new SimpleResponse();

            try
            {
                var model = SimpleMapper.Map <ActorDto, ActorViewModel>(dto);
                response = iActorBusiness.Update(model);
            }
            catch (Exception ex)
            {
                response.ResponseCode    = BusinessResponseValues.InternalError;
                response.ResponseMessage = "Güncelleme iþleminde hata oluþtu.";
                SimpleFileLogger.Instance.Error(ex);
            }

            return(response);
        }
Пример #5
0
        public SimpleResponse Update(ActorViewModel model)
        {
            var response = iActorBusiness.Update(model);

            return(response);
        }