public IActionResult CompartilharQrCode(string exameId, EPeriodoComp periodo) { var key = _exameService.GerarCodigoComp(exameId, periodo); string port = !HttpContext.Request.Host.Port.HasValue ? "" : $":{HttpContext.Request.Host.Port}"; string http = HttpContext.Request.IsHttps ? "https://" : "http://"; string host = $"{http}{HttpContext.Request.Host.Host}{port}"; string path = $"{host}/exame/compartilhado/{key}"; return(View(new ExameCompViewModel { ExameId = exameId, Periodo = periodo, Key = key, Url = path })); }