public async Task <ActionResult> Edit(ProductListViewModel.ProductInfo viewModel) { var input = ObjectMapper.Map <CreateUpdateProductInput>(viewModel); await _productAppService.UpdateProduct(input); TempData["message"] = $"{viewModel.Name} has been saved"; return(RedirectToAction("Index")); }
//public async Task<ActionResult> Edit(ProductDto product) public async Task <ActionResult> Edit(ProductListViewModel.ProductInfo viewModel) { //weiter mit 290 - custom client validation with var indsfdsf = viewModel.MapTo <CreateUpdateProductInput>(); //var input = ObjectMapper.Map<UpdateProductInput>(viewModel); await _productAppService.UpdateProduct(indsfdsf); TempData["message"] = $"{viewModel.Name} has been saved"; return(RedirectToAction("Index")); }