コード例 #1
0
        public async Task <IActionResult> Index(string redirectKey)
        {
            var redirectUri = await _urlShortener.GetAsync(redirectKey);

            if (redirectUri is null)
            {
                return(View());
            }
            else
            {
                return(Redirect(redirectUri.AbsoluteUri));
            }
        }