Skip to Content
Professional C# 5.0 and .NET 4.5.1
book

Professional C# 5.0 and .NET 4.5.1

by Christian Nagel, Jay Glynn, Morgan Skinner
February 2014
Intermediate to advanced
1560 pages
50h 21m
English
Wrox
Content preview from Professional C# 5.0 and .NET 4.5.1

Chapter 33ADO.NET Entity Framework

WHAT’S IN THIS CHAPTER?

  • Programming Models
  • Mapping
  • Entity classes
  • Object contexts
  • Relationships
  • Querying data
  • Updates
  • Code First

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/go/procsharp on the Download Code tab. The code for this chapter is divided into the following major examples:

  • Books Demo
  • Payments Demo
  • Formula 1 Demo
  • Code First Demo
  • Code First Migrations

PROGRAMMING WITH THE ENTITY FRAMEWORK

The ADO.NET Entity Framework is an object-relational mapping framework that offers an abstraction of ADO.NET to get an object model based on the referential databases. You can use different programming models with the Entity Framework: Model First, Database First, and Code First. Both Model First and Database First provide mapping information with a mapping file. Using Code First, mapping information is all done via C# code. This chapter provides information about all these programming models.

You will learn about the mappings between the database and the entity classes using the Conceptual Schema Definition Language (CSDL), the Storage Schema Definition Language (SSDL), and the Mapping Schema Language (MSL). Different relationships between entities are covered, such as one table per hierarchy of objects, one table per type, and n-to-n relationships.

This chapter also describes different ways to access the database from the code directly with the EntityClient provider, using Entity ...

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

Pro C# 2010 and the .NET 4 Platform, Fifth Edition

Pro C# 2010 and the .NET 4 Platform, Fifth Edition

Andrew Troelsen
ASP.NET 2.0 Illustrated

ASP.NET 2.0 Illustrated

Alex Homer, Dave Sussman
Professional Visual Studio® 2008

Professional Visual Studio® 2008

Nick Randolph, David Gardner

Publisher Resources

ISBN: 9781118832981Purchase book