public IActionResult ViewShortUrl(string hash) { var repo = new UrlRepository(_connectionString); var url = repo.GetULByHash(hash); if (url == null) { return(Redirect("/")); } //var ul = repo.GetULByHash(hash); repo.AddView(url.Id); return(Redirect(url.Url)); }