public IActionResult FindShippingMethod(Guid methodId) { var response = new EditShippingMethodViewModel { Id = Guid.NewGuid(), AddedBy = "aaaa", Title = "wwwwww wwwww", Price = 5 }; return(Ok(response)); }
public IActionResult EditShippingMethod(EditShippingMethodViewModel model) { try { if (ModelState.IsValid) { var shippingMethod = _mapper.Map <ShippingMethod>(model); _storeRepository.UpdateShippingMethod(shippingMethod); _unitOfWork.Commit(); } return(RedirectToAction(nameof(this.ManageShippingMethods))); } catch { return(View()); } }