Skip to Content
Microsoft® SQL Server 2012 Unleashed
book

Microsoft® SQL Server 2012 Unleashed

by Ray Rankins, Paul T. Bertucci, Chris Gallelli, Alex T. Silverstein
December 2013
Intermediate to advanced
1872 pages
153h 31m
English
Sams
Content preview from Microsoft® SQL Server 2012 Unleashed

Data Operations with EF Entities

To get you started querying against EF entities, we’ll dive right into some C#-based examples.

Querying Entity Data Using LINQ to Entities

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® SQL Server 2008 R2 Unleashed

Microsoft® SQL Server 2008 R2 Unleashed

Ray Rankins, Paul Bertucci, Chris Gallelli, Alex T. Silverstein
Inside Microsoft® SQL Server® 2008: T-SQL Programming

Inside Microsoft® SQL Server® 2008: T-SQL Programming

Dejan Sarka Itzik Ben-Gan Greg Low, Roger Wolter, Ed Katibah, and Isaac Kunen

Publisher Resources

ISBN: 9780133408539Purchase book