public IActionResult Edit(EditClientViewModel editClient) { bool result = clientServices.EditClient(editClient); if (!result) { return(View(editClient)); } else { return(Redirect("/Client/All/")); } }
public ActionResult Edit(int id, ClientDetailsViewModel clientViewModel) { try { var client = _mapper.Map <ClientDTO>(clientViewModel); _clientServices.EditClient(client); return(RedirectToAction(nameof(Index))); } catch { return(View()); } }
public IActionResult EditClient([FromBody] Client client) { _clientServices.EditClient(client); return(Ok()); }