public IHttpActionResult UpdatePost(StoreViewModel model) { var response = new SimpleResponse(); response = iStoreBusiness.Update(model); return(Json(response)); }
public IActionResult UpdatePost(StoreViewModel model) { var response = iStoreBusiness.Update(model); if (response.ResponseCode > 0) { return(RedirectToAction("Index")); } else { ModelState.AddModelError(string.Empty, response.ResponseMessage); return(View("Edit", model)); } }
public IActionResult Put([FromBody] Store store) { if (store == null) { return(BadRequest()); } var updatedStore = _storeBusiness.Update(store); if (updatedStore == null) { return(NoContent()); } return(new ObjectResult(updatedStore)); }
public SimpleResponse Update(StoreDto dto) { var response = new SimpleResponse(); try { var model = SimpleMapper.Map <StoreDto, StoreViewModel>(dto); response = iStoreBusiness.Update(model); } catch (Exception ex) { response.ResponseCode = BusinessResponseValues.InternalError; response.ResponseMessage = "Güncelleme iþleminde hata oluþtu."; SimpleFileLogger.Instance.Error(ex); } return(response); }
public SimpleResponse Update(StoreViewModel model) { var response = iStoreBusiness.Update(model); return(response); }