public IActionResult Delete(ClientDTO clientDto) { try { var client = clientDto.MapToClient(); var result = client.Delete(); return(Ok(result)); } catch (Exception exception) { return(RedirectToAction("Error")); } }
public IActionResult Delete([FromBody] ClientDTO clientDto) { try { var client = clientDto.MapToClient(); var result = client.Delete(); return(Ok(result)); } catch (Exception exception) { return(NotFound()); } }