Downloads

Tuesday, January 01 2008

This page will be used to provide code samples from the book and the sample databases. I am also placing downloads for my Entity Framework conference presentations on this page.

1st Edition Downloads

(Looking for downloads for 2nd Edition?)

Note: A few people have reported problems with the links because of the url redirection. If you can't get the downloads from the main links, try the "alternate" which I am now providing along with each link.

1st ed: Database Scripts for Programming Entity Framework  (202kb)   [alternate]
*updated 1/31/2009 (minor change to data in BreakAway)
*updated 2/25/2009 to add vOfficeAddresses view back into BreakAway. It is not used in code samples, but is used to help explain DefiningQuery in Chapter 13.
*updates 3/27/2009 to modify a problem that might cause the vOfficeAddresses view to not get created.

  1. ReadMe.txt
  2. Create_ProgrammingEFDB1_SQLServer2005.sql (Script to create sample database used in Chapters 1-6 for SQL Server 2005 )
  3. Create_ProgrammingEFDB1_SQLServer2008.sql (Script to create sample database used in Chapters 1-6 for SQL Server 2008 )
  4. Create_BreakAway_SQLServer2005.sql (Script to create sample database used in Chapters 7+  for SQL Server 2005 )
  5. Create_BreakAway_SQLServer2008.sql (Script to create sample database used in Chapters 7+ for SQL Server 2008 )

1st ed:  A note for SQL Server Express Users  Mar 10, 2009   [alternate]
 

1st ed: Chapter 7 BreakAway Model Projects (57kb)  Jan 28, 2009   [alternate]
*Updated 9/7/2009 with modified ReadMe.TXT
Contains VB and CSharp projects for the BreakAway model created in the Chapter 7 walkthroughs.

1st ed: Chapter 8 WinForm and WPF Projects (964kb)  Jan 28, 2009    [alternate]
*updated 1/31/2009: minor change to WinForm UI to overcome known issue with ComboBoxes (not related to EF)
*updated Mar 10, 2009: minor change to ValidateNewTrips method in WPF solution

*Updated 9/7/2009 with modified ReadMe.TXT
Contains solutions for the WinForm and WPF applications created in Chapter 8. There are VB and CSharp versions for each solution. Each solution also contains a project containing the version of the BreakAway model that is current for this chapter.

1st ed: Chapter 9 info on Independent Associations
2nd edition focuses on Foreign Key associations. In that edition, I wrote that you can download Chapter 9 from 1st edition if you want to learn about the other style of defining assocations. It's actually chapter 15, not 9. And additionally, there's some more info in Chapter 17.. Scroll down a bit further where you can find PDF versions of Chapter 15 and a section of 17.

1st ed: Chapter 11 EntityDataSource Projects (646kb)  Jan 28, 2009    [alternate]
*Updated 9/7/2009 with modified ReadMe.TXT
Contains solutions for the second ASP.NET application created in Chapter 11. There is one solution in VB and one in CSharp. Each solution also contains a project containing the version of the BreakAway model that is current for this chapter. The "HelloEntities" example created in the beginning of the chapter is not included.

1st ed: Chapter 14 Web Service and WCF Service Projects (1.75mb)  Jan 28, 2009    [alternate]
*Updated 9/7/2009 with modified ReadMe.TXT
Contains solutions for the Web Service and WCF applications created in Chapter 14. Each application is provided in VB and CSharp and each solution also contains a project containing the version of the BreakAway model that is current for this chapter.

1st ed: Chapter 15: Working with Relationship and Associations (entire chapter as PDF)
If you need to work with Independent Associations, which were the only way to define relationships in EF3.5 (VS2008), you won't find much information on that in the 2nd edition of the book. EF4/VS2010 introduced Foreign Key associations and the 2nd edition focuses on those instead even though you can still use the other style if you need to. This chapter from the first edition, plus a section of Chapter 17 (below), will provide you with detailed info on Independent Associations.

1st ed: Chapter 16 Generated Views Samples (34kb) Jan 28, 2009    [alternate]
Contains a VB and CSharp version of the pre-generated views for the BreakAway model created using EDMGen /FullGeneration.

1st ed: Chapter 17: Section on Working with Relationship in ObjectStateManager (6 pages from Chapter 17 as PDF)
If you need to work with Independent Associations, which were the only way to define relationships in EF3.5 (VS2008), you won't find much information on that in the 2nd edition of the book. EF4/VS2010 introduced Foreign Key associations and the 2nd edition focuses on those instead even though you can still use the other style if you need to. Chapter 15 from the first edition, plus this section of Chapter 17, will provide you with detailed info on Independent Associations.

1st ed: Chapter 17 ObjectStateEntry Visualizer (89kb) Jan 29, 2009   [alternate]
Contains both a VB and a CSharp project with the ObjectStateEntry Visualizer Extension Method built in Chapter 17.

1st ed: Chapter 17 Dynamic Entity Graph Builder (153kb) Jan 29, 2009    [alternate]
Contains both a VB and a CSharp project with the dynamic entity graph code which is the last sample in Chapter 17.

1st ed: Chapter 17 (and other) Extension Methods
Contains CSharp extension methods used throughout the book. Many of these are contained in their relevant project downloads as well.

1st ed: Chapter 18 - Persisted State Entry
VB Version

1st ed: Chapter 19 - Scripts for AdventureWorksSuperLT (108kb) April 9, 2009 [alternate]
Two separate scripts to create this database in SS2005 and SS2008.

1st ed: Chapter 20 n-Tier Windows Form Solution (1.14mb) Jan 31, 2009  [alternate]
*updated Feb 24th to work around an EF problem that impacted the invoked queries
*updated July 8th to incorporate some code that didn't make it from my working samples to the download samples.
*Updated 9/7/2009 with modified ReadMe.TXT

Contains both a VB and a CSharp solutions for WinForm app and DataBridge built in Chapter 20.

1st ed: Chapter 21 n-Tier ASP.NET Solution (711kb) Feb 24 2009    [alternate]
*Updated 9/7/2009 with modified ReadMe.TXT
Contains both a VB and a CSharp solutions for the ObjectDataSource ASP.NET app built in Chapter 21.

1st ed: Chapter 22 WCF  Solution (711kb) Feb 27 2009    [alternate]
*Updated 9/7/2009 with modified ReadMe.TXT

2nd Edition Downloads

2nd Edition Databases
Sample Database for Chapters 2-6 (exe installer)
Script for Sample Database for Chapters 2-6
Sample Database MDF and LDF for SQL Server 2008

BreakAway Database for 2nd Edition (exe installer) (revised 8/13/2010)
Script for BreakAway Database ... Schema and Data only. You must create database yourself. Verified on SS2008R2.
BreakAway MDF & LDF for SQL Server 2008

2nd ed: Chapter 2-6
Sample Model Created in Chapter 2 and Used Through Chapter 6 (added 8/20/2010 – can be used in C# or VB projects)

2nd ed: Chapter 7
Sample Model Created in Chapter 2 with Stored Procedure Mappings Added in Chapter 7 (8/20/2010 – can be used in C# or VB projects)

2nd ed: Chapter 8
BreakAway Model (8/20/2010 – can be used in C# or VB projects)

2nd ed: Chapter 9
Windows Forms App (C#) (8/21/2010)   Windows Forms App (VB)
Windows Presentation Foundation App (C#) (8/21/2010)  WPF App (VB)

2nd ed: Chapter 11
Partial Class Customizations for Various Entities (8/22/2010)      Samples in VB

2nd ed: Chapter 12
Drag & Drop ASPNET Apps

2nd ed: Chapter 13
Modified T4 Template from Chapter 13 (currently C# only, added 8/20/2010)

2nd ed: EDMX after Chapter 14 - 16 Customizations
Customized Model Post Chapter 16 (can be used in C# or VB projects)

2nd ed: Chapter 16
SaveCustomerMessage.xml
Example of the message sent from client to service in the Self-Tracking Entities section of the chapter.

2nd ed: Chapter 17
Custom WCF (EntityObjects) Solution with Console UI (8/20/2010)   VB Solution

2nd ed: Chapter 18
Modified T4 Template from Chapter 18 (currently C# only, added 8/20/2010)  Modified T4 Template for Visual Basic (is in the VB Solution below)
Custom WCF (POCOs) Solution with Console UI  (8/20/2010)  VB Solution
Self Tracking Entities Solution

2nd ed: Chapter 20
Pre-Compiled Queries Example (currently C# only, added 9/5/2010)
Threading and Performance Testing Examples (currently C# only, added 9/5/2010)

2nd ed: Chapter 21
ObjectStateVisualizer, Dynamic Entity SQL  & Dynamic Graph Creation Examples C#
VB Solution 

2nd ed: Extension Methods used in Later Chapters
Extension Methods (currently C# only, added 9/5/2010)

2nd ed: Chapter 24
Solution with POCOs, tests, repositories, etc (currently C# only, added 9/21/2010)

2nd ed: Chapter 25
Code First Solution Updated to use CTP5 and New Features 

2nd ed: Chapter 26
C#: WPF Solution using Layered Architecture   Sample in Visual Basic (added Feb 2013!)

2nd ed: Chapter 27
ASP.NET WebForms and MVC Apps using POCOs & repositories from chapter 24 (C#, added 10/3/2010)

Code First Edition (published nov 2011)

Chapter 2 C# Chapter 2 VB
Chapter 3 C# Chapter 3 VB
Chapter 4 C# Chapter 4 VB
Chapter 5 C# Chapter 5 VB
Chapter 6 C# Chapter 6 VB
Chapter 7 C# Chapter 7 VB
   

Thanks to Instant VB from Tangible Software Solutions for making the C# to VB conversions quick & painless and to PepLluis, a Visual Basic MVP for validating that those converted samples worked as advertised! 

dbcontext Edition (published feb 2012)

Starting Solution C#  
After Completing Chapter 2 C#  
After Completing Chapter 3 C#  
After Completing Chapter 4 C#  
After Completing Chapter 5 C#  
After Completing Chapter 6 C#  
After Completing Chapter 7 C#  
After Completing Chapter 8 C#  

Presentation Downloads


1. DevConnections Fall 2009 Entity Framework Tips & Tricks
    Powerpoint
     http://www.slideshare.net/JulieLerman/lerman-vvs14-ef-tips-and-tricks

2. DevConnections Fall 2009 Entity Framework 4 and ASP.NET

    Powerpoint
    http://www.slideshare.net/JulieLerman/lerman-adx303-entity-framework-4-in-aspnet

3. DevConnections Fall 2009 Entity Framework 4 and WCF
    PowerPoint
    http://www.slideshare.net/JulieLerman/lerman-vvs13-entity-framework-4-and-wcf

4. OreDev, Vermont.NET and NotATPDC: Agile Entity Framework 4

  • Part 1: POCOs
  • Part 2: Repository/Testing (demos coming soon)

    Powerpoint
    http://www.slideshare.net/JulieLerman/agileentity-framework-4

5. Persistence Ignorant Entity Framework 4 (EF NYC Firestarter (Sept 2010), New England Code Camp (Oct 2010), Cleveland .NET SIG (Aug 2010)

6. n-Tier ASP.NET Web Forms Apps with Entity Framework (New England Code Camp (Oct 2010)

7. Fall 2010: DDD8a, SDN, DevConnections

8. GIDS11 (Bangalore April 2011)

9. DevSummit 2011 (Stockholm May 2011)

---------------------------------------------------------------

Entity Framework Deep Dive into Object Services
SDN 2008, DevReach 2008, DevConnections Fall 2008, DevTeach Montreal 2008
Contains PDF version of PowerPoint and zip files with samples

EF Workshop Database Script (updated June 12, 2009)

Entity Framework Tips & Tricks (updated August 31, 2009)
Presented at Communities2Communities (Warsaw Poland), TechEd 2009 North America, O'ReillyNet Webcast
Contains demos, PowerPoint & database script files

AdventureWorksSuperLT SQL Server 2008 database
Simplified version of Microsoft's AdventureWorksLT sample database
This is an executable created with RedGate's SQL Packager. If you prefer scripts, look under 1st Edition, Chapter 19 higher up on this page.

pluralsight Downloads


Pluralsight Entity Framework Modeling Course (Stored Procedures module)
I’ve been asked for the database that matches this particular course. It’s contained in this Visual Studio solution.