public async Task <IActionResult> EditDirection([FromBody] Direction direction) { try { if (string.IsNullOrEmpty(direction.PatientName) || (Convert.ToInt32(direction.Id) == 0) || (string.IsNullOrEmpty(direction.SeatDirection) || (string.IsNullOrEmpty(direction.Type)) || (string.IsNullOrEmpty(direction.Status)))) { throw new ArgumentNullException(); } await _registry.EditDirection(direction); return(Ok("Направление успешно изменено")); } catch (ArgumentNullException ex) { throw new ArgumentNullException("Входные параметры не заполнены", ex); } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }