public FileResult Download(int id) { var book = BookAPI.GetBook(id); var filePath = Server.MapPath("~/Files/" + book.RealFileName); var contentType = MimeMapping.GetMimeMapping(book.RealFileName); return(File(filePath, contentType, book.FileName)); }
public ActionResult Delete(int id) { var b = BookAPI.GetBook(id); if (b == null) { return(HttpNotFound()); } return(View(b)); }