Skip to Content
Professional C# 4 and .NET 4
book

Professional C# 4 and .NET 4

by Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner
March 2010
Intermediate to advanced
1846 pages
58h 42m
English
Wrox
Content preview from Professional C# 4 and .NET 4

Chapter 31. ADO.NET Entity Framework

WHAT'S IN THIS CHAPTER?

  • The ADO.NET Entity Framework

  • Mapping between database tables and entity classes

  • Creating entity classes and their features

  • Object contexts

  • Relationships

  • Object queries

  • Updates

  • LINQ to Entities

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. This chapter gives information on the mappings between the database and the entity classes using the Conceptual Schema Definition Language (CSDL), 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 Entity Client, using Entity SQL or helper methods that create Entity SQL, and using LINQ to Entities. Object tracking and how the data context holds change information for updating data is also shown.

Note

This chapter uses the Books, Formula1, and Northwind databases. You can download the Northwind database from msdn.microsoft.com; the Books and Formula1 databases are included with the download of the code samples at http://www.wrox.com.

OVERVIEW OF THE ADO.NET ENTITY FRAMEWORK

The ADO.NET Entity Framework provides a mapping from the relational database schema to objects. Relational databases and object-oriented languages ...

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Professional C# 7 and .NET Core 2.0, 7th Edition

Professional C# 7 and .NET Core 2.0, 7th Edition

Christian Nagel
Professional C# 2012 and .NET 4.5

Professional C# 2012 and .NET 4.5

Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 9780470502259Purchase book