Programming Entity Framework: DbContext and over one million other books are available for Amazon Kindle. Learn more
CDN$ 26.99
Only 2 left in stock (more on the way).
Ships from and sold by
Gift-wrap available.
Programming Entity Framew... has been added to your Cart
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Programming Entity Framework: DbContext Paperback – Mar 10 2012

See all 2 formats and editions Hide other formats and editions
Amazon Price New from Used from
Kindle Edition
"Please retry"
"Please retry"
CDN$ 26.99
CDN$ 15.68 CDN$ 17.14

Frequently Bought Together

Programming Entity Framework: DbContext + Programming Entity Framework: Code First + Programming Entity Framework: Building Data Centric Apps with the ADO.NET Entity Framework
Price For All Three: CDN$ 100.97

Buy the selected items together

Product Details

Product Description

Book Description

Querying, Changing, and Validating Your Data with Entity Framework

About the Author

Julia Lerman is the leading independent authority on the Entity Framework and has been using and teaching the technology since its inception in 2006. She is well known in the .NET community as a Microsoft MVP, ASPInsider, and INETA Speaker. Julia is a frequent presenter at technical conferences around the world and writes articles for many well-known technical publications including the Data Points column in MSDN Magazine.

Julia lives in Vermont with her husband, Rich, and gigantic dog, Sampson, where she runs the Vermont.NET User Group. You can read her blog at and follow her on Twitter at julielerman.

Rowan is based in Seattle, Washington and works as a Program Manager for the ADO.Net Entity Framework team at Microsoft. Prior to moving to the US he resided in the small state of Tasmania in Australia. Rowan speaks at technical conferences and blogs at Outside of technology Rowan's passions include snowboarding, mountain biking, horse riding, rock climbing and pretty much anything else that involves being active. The primary focus of his life, however, is to follow Jesus.

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

There are no customer reviews yet on
5 star
4 star
3 star
2 star
1 star

Most Helpful Customer Reviews on (beta) 31 reviews
4 of 4 people found the following review helpful
The Book on DbContext June 10 2012
By G. van Staden - Published on
Format: Kindle Edition
DbContext is covered in extreme detail in this book. The pace is gradual but you will really know how to use DbContext after reading this.

Given that DbContext is part of Entity Framework, I understand the need to make reference to other EF books. I think the book exploits this a bit and the numerous references to the authors' other books is annoying. The example code is also based on the authors' other books but, even if you have not read them, is understandable and useful.

The coverage ranges from an introduction to what DbContext is and how it fits-in to Entity Framework, through how it works and on to the future vision for DbContext and Entity Framework. This book contains more than recipes for successful use. Great detail is given as to how DbContext and EF work with code to create database queries, track changes and manipulate data.

In combination with the supporting website, which is excellent, this book is a valuable resources for anyone really wanting to gain complete understanding of DbContext.
3 of 3 people found the following review helpful
Best Book on DBContext May 7 2012
By George - Published on
Format: Paperback
Julia Lerman is one of my go to people when it comes to Entity Framework. Between her several books, blogs and videos, she is one of the main sources for Entity Framework information.
Julia and Rowan writing style is easy to understand. The book is full of code examples without over doing it. The book is only a couple hundred pages, but covers the topic very well.
DbContext is only a part of Entity Framework, but an important part. Understanding it will make using Entity Framework much easier and make the developer much more productive.
Just understanding the differences between Lazy Loading, Eager Loading, Explicit Loading and understanding when your queries are querying against the database or local memory is worth getting the book.
The authors have other books on programming Entity Framework, but this is the most in-depth book covering DbContext. Not the first place to learn about Entity Framework, but when it comes to DbContext, at the moment, there is nothing better.
2 of 2 people found the following review helpful
Great Guided Tour of the API April 6 2012
By Liles Family - Published on
Format: Paperback
I just finished this on my kindle and I have to say, well done. It is a great guided tour of the API and will help just about everyone in some way. I especially like the validation dive, as well as the detailed explanations of the change tracker API. When you get into distributed transactions and dealing with N-tier applications, this is required knowledge. Having this as a reference is invaluable and should be a reserved spot in the library for anyone writing Code First Entity Framework.
1 of 1 people found the following review helpful
Great Book! Feb. 4 2014
By ComputerJunkie - Published on
Format: Paperback
What a page turner! Couldn’t put it down! Yeah, ok that’s the kind of things you might hear about a good novel, but seriously the author has taken the deeply technical material and made it very interesting and relevant!

The detailed handling of the capabilities of dbContext are superb and the examples used made it abundantly clear as to the best uses of the described features. I considered myself pretty knowledgeable with entity framework, but I found a great deal of new information stuffed into this relatively small book.

The information in the first chapters of the book get the basic user up to speed, while still pointing out tips to the advanced users. Going from the most basic differences between the older methods of using data with the entity framework to the new object description can be helpful to those with experience in the previous versions. I like the trick of setting up the context in a using statement to help to dispose the object.

The section on LINQ to entities as a good tutorial, but I wish there was a link to a reference on performance versus other methods of querying. Her description of the different methods of loading the object tree was very useful and can be of immediate benefit to most readers. The book illiterates the advantages and disadvantages of each technique in simple terms.

How EF handled change tacking was a mystery to me, but she clarified the methods used and techniques to enhance performance in a clear manner with great examples.

The coverage of data validations was likewise technical but written in a very understandable way. The techniques found here will save me time and effort in the future.

I had been looking for details of how to use the entity framework and dbContext in a disconnected and multi-tier environment and it was covered pretty well in this book although, I would have liked to see more than a couple of paragraphs on WCF Data services in a multi-tier environment.

I would highly recommend this book for anyone from novice to expert in the use of EF.
1 of 1 people found the following review helpful
"Programming Entity Framework: DbContext" by Lerman/Miller Aug. 27 2013
By bibliomanic - Published on
Format: Paperback
This is one of those books I was very eager to read and review, and I wasn't disappointed. In fact as soon as I got it from the publisher, I started working through it, eagerly devouring every word. Julie Lerman and Rowan Miller demonstrate DbContext, an API for the Entity Framework that lets you query plain old common objects (POCO) or collections of entities and any related data.

This book and another companion title, Programming Entity Framework: Code First, are continuations to the Programming Entity Framework: Building Data Centric Apps with the ADO.NET Entity Framework (all three available from O'Reilly). You could more accurately call them extensions of material originally covered in that book, but not repetitions—thank you O'Reilly!

The book begins by covering the basics of the DbContext API and where it fits into the world of EF but does so without bloat. The authors then jump into the sample BreakAway project and by Chapter 2 you'll be writing full-fledged methods to query data! The book covers sorting, filtering, and joining related entities as well as navigating entity rows.

Next comes a thorough coverage to using the DbContext API for data manipulation (insert/update/delete) on both single and multiple entities. It also introduces change tracking, a very important aspect of working with EF. It's obvious the authors understand this because they devote a later chapter to it in detail. The book then turned to working with disconnected, n-tier architectures (shocking me since I've been working with EF for awhile and didn't even know it had these capabilities). Finally, Julie and Rowan bust a move by diving into logic validations, and a whole chapter on using DbContext in a variety of advanced scenarios. Yes, this includes preexisting applications (vielen dank)!

A highly notable aspect was the numerous and comprehensive code samples. I'm not talking snippets here, but fully functional programs that contain properties, methods and complete syntax for learning to work with DbContext. You will want to download the BreakAway project files from And trust me, the project just works and that can't be said for too many of those sample code downloads you get from a lot of books.

Some might assume this book an afterthought due to its close relationship with Programming Entity Framework: Building Data Centric Apps with the ADO.NET Entity Framework. Don't be misled. I say this book didn't meet my expectations. It exceeded them! I also feel keeping the page count down on the book did it justice. This allowed our venerable authors to maintain focus on the topic at hand, which also makes it a great reference. If you're interested in learning the DbContext API, this is the book to keep close at hand. I may even order me a hard copy of this one and get it autographed by Julie and Rowan; I predict it'll go down as a classic!

* Disclaimer: The e-book version of this book was given to me by a representative of the publisher in exchange for a review. However, all opinions and observations regarding the text are my own, and based on my experience as a professional developer.