public string UpdateClovek(Auto auto) { try { _autoData.UpdateAuto(auto); return(string.Format("Auto has been updated")); } catch (Exception) { return(string.Format("Error Updating new Car")); } }
public async Task <IActionResult> Details(AutoModel auto) { var autoId = await _autoData.UpdateAuto(auto); return(RedirectToAction("Details", new { autoId })); }