public async Task <ActionResult> Put([FromBody] VisitorDtoPut visitor) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var result = await _service.Put(visitor); if (result != null) { return(Ok(result)); } else { return(BadRequest()); } } catch (ArgumentException e) { return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message)); } }