Jump to ratings and reviews
Rate this book

Programming Entity Framework: Code First: Creating and Configuring Data Models from Your Classes

Rate this book
Take advantage of the Code First data modeling approach in ADO.NET Entity Framework, and learn how to build and configure a model based on existing classes in your business domain. With this concise book, you’ll work hands-on with examples to learn how Code First can create an in-memory model and database by default, and how you can exert more control over the model through further configuration. Code First provides an alternative to the database first and model first approaches to the Entity Data Model. Learn the benefits of defining your model with code, whether you’re working with an existing database or building one from scratch. If you work with Visual Studio and understand database management basics, this book is for you.

190 pages, Paperback

First published January 1, 2011

31 people are currently reading
86 people want to read

About the author

Julia Lerman

29 books18 followers
Julie Lerman is a Microsoft MVP, .NET mentor and consultant who lives in the hills of Vermont. You can find Julie presenting on data access and other Microsoft .NET topics at user groups and conferences around the world. Julie blogs at thedatafarm.com/blog, is the author of the highly acclaimed "Programming Entity Framework (with a second edition released in August 2010) and authors the MSDN Magazine Data Points column. Follow Julie on twitter at julielerman.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
52 (29%)
4 stars
75 (43%)
3 stars
41 (23%)
2 stars
5 (2%)
1 star
1 (<1%)
Displaying 1 - 13 of 13 reviews
Profile Image for David.
30 reviews
October 19, 2013
I really enjoyed this book. Some information is a little out-of-date, especially in the section regarding what comes next. Also, the metadata table that they mention also doesn't exist any more, either.

Overall, honestly I'd say this book is definitely worth reading to anyone who's into C#/Entity Framework. I found that this book really supplements the Pro ASP.NET MVC 4 book that I am also going through. There's quite a bit with the entity framework, and the Pro ASP.NET book simply didn't cover everything needed.

This book is very much worth reading.
Profile Image for Ben Rand.
335 reviews7 followers
February 13, 2013
When I received this book (and the counterpart DbContext), I was a little disappointed at how short it is. But it's actually just very focused and concise, a rarity in most programming books. Well written, clear, and to the point with no fluff.

If you're new to EntityFramework, you still probably need to read the seminal Programming EntityFramework, but this is a very good companion covering an aspect of EF I'd like to use.
29 reviews2 followers
May 22, 2019
Good material if you’re looking to get a handle on Entity Framework’s Code First facility. It’s not very dense and seems to be intended as a light and general purpose overview to get you going from nearly from scratch. There are examples provided for each topic covered. The only requirement is that you’ve learned some C# syntax and have created a basic .Net MVC app or two. I found it slow to read at points because the explanations are longer than necessary. But the reward is a decent explanation of the how and what of the Code First toolbox. Even though it is a book eight years old (which in tech can be a lifetime), it still has use today for MVC developers. You’ll want to check up on Code First features afterwards.
Profile Image for Quinton Baran.
524 reviews
January 17, 2019
I only started the first chapter or so of this book, stopping when my experiment with programming was put on hold. I have used the technology, which is an excellent method of building database structures in C#.
4 reviews
September 17, 2021
They make you do this the hard way since model first never worked for me only code first where you had to type everything like you people are asinine Microsoft
4 reviews1 follower
November 28, 2014
Great book if you are starting with Code First.
I was expecting more examples with a bit more complex scenarios, but even ones provided are good enough.
The book does not talk much about how run different queries. It really focuses on different aspects of Entity Framework Code First.

Also, the edition I was reading was about EF 4.1, which was outdated version at that time, so things have changed in EF since.

10 reviews
November 26, 2014
Only 176 pages, but well focused. Covers the key concepts and implementation of the default conventions and details how they can be overridden or disabled as required. This and the companion "Programming Entity Framework DBContext" together form a great reference to the Code First approach introduced to Entity Framework.
Profile Image for Scott W. Vincent.
64 reviews5 followers
February 10, 2015
Quick, well-organized guide to Code First. It came recommended to me by another developer and served as a good introduction. I'm sure it will continue to be great as a reference once I dive into EF with my project.
Profile Image for Luong Le Tu.
2 reviews1 follower
August 12, 2013
a good book for code first in ef, but it is a little outdated now. Hope for an update- i.e. 3rd Edition
Profile Image for Ann.
5 reviews
August 6, 2016
Good intro to Code First, enough to get you up and running if you're already familiar with EF. Book came out before Migrations, however -- hopefully Lerman will update soon.
Profile Image for Eugenio.
71 reviews3 followers
September 3, 2016
Хорошая книга для начала работы... Как видно из названия, рассказывается только про одну из граней Entity Frmework.
1 review
August 7, 2015
Great book, contains a lot of typos/errors though...
Profile Image for Indra Gunawan.
4 reviews
January 16, 2014
Very detail and helpful especially for someone who is new to Entity Framework (Code First)
Displaying 1 - 13 of 13 reviews

Can't find what you're looking for?

Get help and learn more about the design.