public ActionResult Index() { // Create the view model for our view var model = new HomeIndexViewModel(); return View(model); }
public async Task<FileResult> DownloadFile() { // Map path to the download file var pathName = Server.MapPath("~/files/KryptPad.application"); // Create the view model for our view var model = new HomeIndexViewModel(); // Increase download count await model.IncrementDownloadCount(); // Return the file return File(pathName, "application/octet-stream", "KryptPad.application"); }