Example #1
0
    public Stream GetBookPhoto(string isbn)
    {
        // Throw exception if isbn is not present
        if (isbn == null)
        {
            throw new Exception("Isbn not supplied");
        }

        // Get path to the data source
        string path = string.Format("{0}..\\..\\..\\Photos",
                                    HostingEnvironment.ApplicationPhysicalPath);

        // Return book photo
        return(BookInfo.GetBookPhoto(isbn, path));
    }