SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 531 | Next

Scott Klein

"Professional LINQ"

Once you have created the schema, a property needs to be changed on it.
Return to the Solution Explorer window, right-click on the XMLSchema1.xsd file, and select Properties
from the context menu, as shown in Figure C-5.
Figure C-5
In the Properties window for the schema, select the property called Build Action. The default value for
this property is None; change it to LinqToXsdSchema, as shown in Figure C-6. This property informs the
project that the schema will be included in the project??™s build process.
351
Appendix C: LINQ to XSD
Figure C-6
The final step is to add some code behind the form. Set the Text property of the second button to Typed,
and double-click the button to display the Click event code for that button.
Before you add the code to the Click event, scroll to the top of the code and add the following
using statement:
using www.AdventureWorks.com.Orders;
Finally, in the Click event for button2, add the following:
var ord = Order.Load("C:\\Wrox\\AppendixC\\Orders.xml");
var total = (from purchaseOrder in ord.OrderDetail
from item in purchaseOrder.


Pages:
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6