Exemplo n.º 1
0
        public IActionResult GetBook(int Id)
        {
            var foundBook     = this.db.Books.Find(Id);
            var bookDirectory = "wwwroot/library/";
            var bookPath      = manager.GetBooksPath(bookDirectory, foundBook);
            var extension     = Path.GetExtension(bookPath);
            var contentType   = manager.GetBooksType(extension);

            return(PhysicalFile(bookPath, contentType));
        }