I spent some time lately to read the book “Entity Framework 4 in Action” which was written by several authors – Stefano Mostarda, Marco De Sanctis and Daniele Bochicchio. This book was sent to me by Manning Publications as part of the Manning Early Access Program (MEAP).
What You are Going to Gain from the Book?
The book is all about Entity Framework 4. The authors don’t assume that you are familiar with the technology and they take you to an Entity Framework tour. At the end of the book you will have a lot of Entity Framework knowledge. The flow of the book is great and there are lots of details and hidden gems that can help you whether you are a junior Entity Framework developer and whether you are a senior Entity Framework developer. The authors take you step by step in the Entity Framework path and late chapters rely on previous ones which help you to build the knowledge gradually.
What is Included in the Book?
The book isn’t small – approximately 550 pages and includes 19 chapters and 2 appendices (LINQ appendix and Tip & Tricks appendix). The book is divided into 4 parts which are
- Redefining your data access strategy
- Working with Entity Framework
- Mastering Entity Framework
- Applied Entity Framework.
Every part relies on the previous parts and therefore you can’t read the parts as standalone if you are a novice in Entity Framework. If you are a senior Entity Framework developer you can read the parts as standalone but you’ll probably miss some details which are included in previous parts.
- Chapter 1: Data access reloaded: Entity Framework The chapter include a discussion about the ORM world and also about the impedance mismatch which lead to the development of ORMs.
- Chapter 2: Getting started with Entity Framework In the chapter the authors shows and describe how to build the Entity Framework part of an application that will be used across the book. During the chapter you’ll get to know what is Entity Framework and will learn a lot of basic stuff.
- Chapter 3: Querying the model: the basics This chapter is all about the basics of querying the Entity Framework model. You will get to know the ways to do that and what is happening under the hood in the query process.
- Chapter 4: Querying with LINQ to Entities The chapter will explain in details what is LINQ to Entities and how to use it.
- Chapter 5: Domain model mapping This chapter is all about the EDM. You will hand craft the EDM parts manually and will gain valuable knowledge about its XML.
- Chapter 6: Understanding entity lifecycle The chapter describes the entity life cycle and the change tracking mechanism. This is a very important chapter since the details in it are very important to the understanding how Entity Framework is working under the hood.
- Chapter 7: Persisting objects into the database The chapter describe how to perform data manipulations by using Entity Framework.
- Chapter 8: Handling concurrency and transactions As in the chapter name, you will learn how to handle concurrency and transactions with Entity Framework.
- Chapter 9: An alternative way of querying: Entity SQL In this chapter you will learn what is Entity SQL and how to apply in order to query the model.
- Chapter 10: Working with stored procedures This chapter is all about stored procedures and how to use them in Entity Framework environment.
- Chapter 11: Working with functions and views The chapter will explain how to use model defined functions and defining query elements.
- Chapter 12: Exploring EDM metadata In this chapter you will gain the understanding how to use the MetadataWorkspace in order to make runtime EDM metadata queries.
- Chapter 13: Customizing code and designer In the chapter you learn how to customize the code generation by changing the Entity Framework T4 templates. Also you will learn how to extend the Entity Framework designer.
- Chapter 14: Designing the application around Entity Framework The chapter starts with a Domain Driven Design discussion and shows how Entity Framework can help you to design applications which are more Domain Driven.
- Chapter 15: Entity Framework and ASP.NET The chapter will guide you how to use Entity Framework with ASP.NET with EntityDataSource.
- Chapter 16: Entity Framework and N-Tier development The chapter discuss how to include Entity Framework inside N-Tier applications. You will learn about the Self-Tracking entities and how to use DTO design pattern.
- Chapter 17: Entity Framework and Windows applications
The chapter will guide you how to use Entity Framework with WPF and WinForms.
- Chapter 18: Testing ADO.NET Entity Framework
The chapter starts with a discussion about Unit Testing and explains how to test Entity Framework by using Microsoft Testing Framework.
- Chapter 19: Keeping an eye on performance
This chapter is all about performance tuning. I expected more from this chapter but the major things of performance tuning are there.
The Bottom Line
This is a very good Entity Framework book and I recommend it especially for junior Entity Framework developers. The book is written in fluent language and organized well. There are discussions about methodologies like Domain Drive Design and Unit Testing that I really liked which add to the content you are reading and enrich your understanding. The book is doing it job by giving a good deep dive into Entity Framework 4. I give the book 5 stars out of 5.