04.07.2013 Views

Programming Entity Framework - Cdn.oreilly.com

Programming Entity Framework - Cdn.oreilly.com

Programming Entity Framework - Cdn.oreilly.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Defining a Complex Type 337<br />

Replacing Properties with a Complex Type 338<br />

Mapping Entities with Complex Types 339<br />

Complex Types Are Not <strong>Entity</strong>Objects 339<br />

Using Complex Types 340<br />

Complex Types in Data-Binding Scenarios 341<br />

Data Binding Complex Types in ASP.NET Without the <strong>Entity</strong>Data-<br />

Source 343<br />

Windows Forms DataSource and Complex Types 345<br />

Removing the Complex Types from the Model 347<br />

Using QueryView to Create Read-Only Entities and Other Specialized<br />

Mappings 348<br />

Creating a Simple QueryView 349<br />

Testing the QueryView 351<br />

Deconstructing the QueryView 351<br />

QueryView with Inherited Types 352<br />

Testing the New QueryView 354<br />

Additional Customization Options 355<br />

Mapping Stored Procedures 355<br />

Multiple <strong>Entity</strong> Sets per Type 356<br />

Self-Referencing Associations 356<br />

Summary 356<br />

13. Working with Stored Procedures When Function Mapping Won’t Do . . . . . . . . . . 359<br />

Does the Procedure Line Up with an <strong>Entity</strong>? 359<br />

Overview of Procedures, UDFs, and TVFs in the EDM 360<br />

Composing Queries Against Functions 360<br />

Mapping and Executing Query Stored Procedures 361<br />

Using Functions That Match an <strong>Entity</strong> Whose Property Names Have<br />

Been Changed 361<br />

Query Stored Procedures and Inherited Types 362<br />

Queries That Return Randomly Shaped Results 363<br />

Replacing Stored Procedures with Views 364<br />

Queries That Return Multiple Resultsets 366<br />

Queries That Return Primitive Types 366<br />

Adding Native Queries to the Model 367<br />

Adding Native Views to the Model 368<br />

DefiningQuery Is Already in Your Model 369<br />

Using DefiningQuery to Create Your Own Views 372<br />

Implementing a DefiningQuery 373<br />

Using DefiningQuery to Solve More Complex Problems 378<br />

Using Commands That Affect the Persisted Database 378<br />

DML Functions That Return Entities 379<br />

Table of Contents | xiii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!