Пример #1
0
        // GET: Update/Download/7
        public ActionResult Download(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            if (!User.Identity.IsAuthenticated)
            {
                return(View("Error"));
            }

            string downloadLink = _updateRepository.GetDownloadLink(id.Value);

            return(string.IsNullOrEmpty(downloadLink) ?
                   (ActionResult)View("Error") : Redirect(downloadLink));
        }