December 2013
Intermediate to advanced
1872 pages
153h 31m
English
To get you started querying against EF entities, we’ll dive right into some C#-based examples.
Returning to your WPF example project, open the source file MainWindow.xaml in the XAML designer. Using the Toolbox window, click and drag a Button and drop it onto the window next the existing button. Name this button btnEntitySelect1, then double-click it to generate its Click event handler code in MainWindow.xaml.cs, and then add the code in Listing 47.7 to btnEntitySelect1_Click.
LISTING 47.7 Using LINQ to Entities to Bind Data to a WPF DataGrid
private void btnEntitySelect1_Click(object sender,RoutedEventArgs e){ AdventureWorks2012Entities ...