CS 233S: Web Application Development II	Name:	
Assignment #6 XML and Querying with LINQ	Date Due:	

In this sixth assignment, you will explore Language Integrated Querying (LINQ) as a way of quickly and easily accessing, sorting, and grouping data from non-relational data stores.
Part A: Text Reading	100 points
1.	Read Chapters 9 and 10 in the textbook. Read all of the pages – you are responsible for the knowledge in each section, even if you are not required to complete the coding. Note that there are several provided files in Blackboard that you will need to download or copy as starting data files. Before you begin:
•	Read the additional instructions in Blackboard: download and extract the linked .zip file, and import the items it contains as directed online.
2.	Follow the VB or C# directions for:
•	Page 447, Listing 9-5: begin a new file, named chap9page1.aspx; add the LINQ namespace as shown either as the first tag underneath the page directive in the .aspx file or add Imports System.Linq (for VB) or Using System.Linq (for C#) to the code behind the page on a line above the start of the class.
•	Page 447, Listing 9-6: modify chap9page1.aspx; add an asp:gridview to the page with the id attribute set to GridView1 and then add the code shown either inside of <script runat="server"></script> tags in the .aspx page or in the code behind file.
•	Page 448, Listing 9-7: modify chap9page1.aspx; add a query2 variable to store the updated LINQ statement and an asp:gridview control with the id attribute set to GridView2 and then bind the data from query2 to the GridView2 control.
•	Page 449, Listing 9-8: modify chap9page1.aspx; update the query2 LINQ statement and thus the GridView2 display.
•	Page 450, Listing 9-9: modify chap9page1.aspx; update the query2 LINQ statement and thus the GridView2 display.
•	Page 451, Listing 9-10: modify the chap9page1.aspx file; add a query3 variable to store the updated LINQ statement and an asp:gridview control with the id attribute set to GridView3 and then bind the data from query3 to the GridView3control.
•	Page 453. Listing 9-11: modify chap9page1.aspx; update the query3 LINQ statement and thus the GridView3 display.
•	Page 453, Listing 9-12: modify the chap9page1.aspx file; add a query4 variable to store the updated LINQ statement and an asp:gridview control with the id attribute set to GridView4 and then bind the data from query4 to the GridView4control.
•	Page 454, Listing 9-13: modify the chap9page1.aspx file; add 4 asp:Label controls with id attributes set to TotalMovies, LongestRuntime, ShortestRuntime, and AverageRuntime and then add the code shown to display statistical information from the data.
•	Page 455. Listing 9-14: right-click the App_Code folder in your website to add a new class file named Genre.vb or Genre.cs. Add the code shown inside the class file.
•	Page 456, Listing 9-15: modify the chap9page1.aspx file; add the GetGenres() function to the existing server-side script on the page or to the code behind file.
•	Page 456, Listing 9-16: modify the chap9page1.aspx file; add a query5 variable to store the updated LINQ statement and an asp:gridview control with the id attribute set to GridView5 and then bind the data from query5 to the GridView5control.
•	Page 457, Listing 9-17: modify the chap9page1.aspx file; update the query5 LINQ statement and thus the GridView5 display.
•	Page 458, Listing 9-19: create a chap9page2.aspx file as shown.
•	Page 459, Listing 9-20: modify the chap9page2.aspx file; add the mapping to separate XML nodes.
•	Page 462, Listing 9-22: modify the chap9page2.aspx file; add a query2 variable to store the updated LINQ statement and an asp:gridview control with the id attribute set to GridView2 and then bind the data from query2 to the GridView2 control.
•	Page 462-464: follow the directions to create the Movies.dbml file at the root level of the website.
•	Page 465, Listing 9-23: create a chap9page3.aspx file as shown.
•	Page 466, Listing 9-24: modify the chap9page3.aspx file; add the LINQ statement and data binding.
•	Page 471, Listing 9-30: modify the chap9page3.aspx file; add the insert LINQ statement and execution.
•	Page 474, Listing 9-31: modify the chap9page3.aspx file; add the update LINQ statement and execution.
•	Page 474, Listing 9-32: modify the chap9page3.aspx file; add the delete LINQ statement and execution.
•	Page 514, Listing 10-16: create a chap10page1.aspx file as shown (with correct page directive changes).
•	Page 515, Listing 10-17: create a chap10page2.aspx file as shown.
•	Page 519, Listing 10-20: create the bookstoHTML.xslt file as shown and then a chap10page3.aspx file.
3.	Email or print the code view (including the code behind the page as needed) from:
•	
•	Chap9page1.aspx
•	Chap9page2.aspx
•	Chap9page3.aspx
•	Chap10page1.aspx
•	Chap10page2.aspx
•	BookstoHTML.xslt
•	Chap10page3.aspx

Part B: On Your Own	100 points
1.	Incorporate XML data into your project site in such a way that: 
a.	A subset of the data is queried using LINQ statements and displayed visually on a page
b.	The data is transformed using either XPath statements or an XSLT stylesheet and displayed visually on a page. (This may be the same page as (a) or a separate page.
2.	Zip your project folder, including the XML data stores and email.