Beispiel #1
0
 public ActionResult Index(string key)
 {
     if (string.IsNullOrWhiteSpace(key))
     {
         return(View());
     }
     else
     {
         ShortUrl url = _service.Get(key);
         if (url != null)
         {
             _service.AddClick(url.Id, Request.UserHostAddress);
             return(new RedirectResult(url.Full, true));
         }
         else
         {
             return(View());
         }
     }
 }