Agribusiness.Web.Controllers.CaseStudyController.AdminDownload C# (CSharp) Метод

AdminDownload() приватный Метод

private AdminDownload ( int id ) : System.Web.Mvc.ActionResult
id int
Результат System.Web.Mvc.ActionResult
        public ActionResult AdminDownload(int id)
        {
            var caseStudy = _casestudyRepository.GetNullableById(id);

            if (caseStudy == null) return File(new byte[0], string.Empty);

            var fileName = caseStudy.Name.Replace(" ", string.Empty);

            return File(caseStudy.File, "application/pdf", string.Format("{0}.pdf", fileName));
        }