public IActionResult Edit(ProductColorEditViewModel model, int Id) { var result = _productColorRepository.Edit(model, Id); TempData.AddResult(result); return(RedirectToAction(nameof(Edit), new { Id })); }
public ServiceResult Edit(ProductColorEditViewModel model, int Id) { var entity = _productColor.Find(Id); Mapper.Map(model, entity); _productColor.Update(entity); _Context.SaveChanges(); return(ServiceResult.Okay()); }