Chapter 1. Data access reloaded: Entity Framework

 

This chapter covers

  • DataSet and classic ADO.NET approach
  • Object model approach
  • Object/relational mismatch
  • Entity Framework as a solution

When you design an application, you have to decide how to access and represent data. This decision is likely the most important one you’ll make in terms of application performance and ease of development and maintainability. In every project we’ve worked on, the persistence mechanism was a relational database. Despite some attempts to introduce object databases, the relational database is still, and will be for many years, the main persistence mechanism.

Nowadays, relational databases offer all the features you need to persist and retrieve data. You have tables to maintain data, views to logically organize them so that they’re easier to consume, stored procedures to abstract the application from the database structure and improve performance, foreign keys to relate records in different tables, security checks to avoid unauthorized access to sensitive data, the ability to transparently encrypt and decrypt data, and so on. There’s a lot more under the surface, but these features are ones most useful to developers.

1.1. Getting started with data access

1.2. Developing applications using database-like structures

1.3. Using classes to organize data

1.4. Delving deep into object/relational differences

1.5. Letting Entity Framework ease your life

1.6. How Entity Framework performs data access

1.7. Summary

sitemap