New Entity Framework in the Enterprise Course on Pluralsight as in published last month but I never blogged about it.

This is a 3hr16 minute course called “Entity Framework in the Enterprise”.

Learn how Entity Framework fits into your overall software solution when using enterprise level architecture. You’ll see how to implement DDD Bounded Contexts with EF, Repository and Unit of Work patterns and a variety of styles of automated testing. This course is applicable to apps built with V2010, EF4.1+ and .NET 4 as well as with VS2012, EF5 and .NET 4.5.

There are four modules.

1) Architecting the Data Layer (Overview)

2) Bounded DbContext

3) Repositories and Unit of Work

4) Automated Testing

Pluralsight put a 10-minute clip of this on YouTube and the blogged about it. The clip focuses on the Domain Driven Design Bounded Context pattern and how I’ll implement it with Entity Framework. Here is that clip.

The full course (which requires a subscription, but a month for $29 that gives you full access to the entire Pluralsight library is pretty cheap!) . Here’s the link to the course.

I now have 9 Entity Framework courses on Pluralsight which is almost 17 hours worth of content.


  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

12 thoughts on “New Entity Framework in the Enterprise Course on Pluralsight

  1. Hi Julie,

    I really enjoyed this course as it’s good to get beyond basic concepts to talk about how you might actually end up using EF within your projects. Really useful!

    As an aside it gave me a little piece of mind around the topic of implementing your own UOW / Repositories; something I was a little concerned about as there appeared to be conflicting opinions on the subject (If interested you can read my ramblings on the topic here:…/unit-testing-an ).

    I’ve still got to watch the automated testing module but I’m looking forward to it – thanks again!

  2. I really enjoyed this course.but

    I would like to know whether entity framework supports Oracle 10g R2 or not.

    I have to develop wep application with Oracle 10g R2 version, Shall i use Entityframework? if yes which one is best Code first or model first?

    Please advice

  3. There are three oracle providers that support EF … One from Devart, one from DataDirect and one from oracle. I don’t know about what versions of oracles they are for but you can probably find that in their websites.

  4. I would love to see you attempt to use the MOQ ( ) tools for your automated testing part of your course at plural sight. While I found it useful, I was really wondering if most of the effort changing the wiring could have been avoided using a mocking tool or such.. Anyway, thanks for the videos they really are very informative and reaffirms why I pay for the plural-sight content every month…

  5. Julie,

    Great video series !! Learned alot about how to split up our very large context into 10 or 12 smaller ones but I am having trouble figuring out how to stop EF from pulling in unwanted entities… I use the Ignore<T> on obvious types but our domain is very large and we have over 400 tables so sometimes it is difficult to determine the reason an entity is being pulled in.

    Any tips on how to log/debug this ?

    For example say I add one DbSet<T> and I want to log how all of the types not directly related to that class get pulled.. How can I do that ?

    Thanks !

  6. Greg, yours is an old familiar name. 🙂 I don’t know of such a thing. However, the modelbuilder will rely your classes to do that, not on your database. So the clues should be in your classes. Also, if you use modelbuilder.Entity<> on any type, that type will be pulled in as well. If this doesn’t help, I’d be happy to look at one model with you and see what you’re missing in understanding how it works. This will help me better communicate to others as well. 🙂

  7. namespace MISBusinessLogicLayer.EntityFramework.Entities.Service.Keys


    public class Key : IValidatableObject


    public Key()



    public int Id { get; set; }

    public DateTime tAdded { get; set; }

    public string Barcode { get; set; }

    public string Description { get; set; }

    public DateTime? tLost { get; set; }

    // FKs

    public int? RentalUnit_Id { get; set; }

    public int? Property_Id { get; set; }

    public int? KeyRing_Id { get; set; } // Can be assigned to a ring or a hook BUT not both

    public int? KeyHook_Id { get; set; }

    // FKs

    public int KeyInServiceType_Id { get; set; }

    //// Relational Refs

    public virtual KeyInServiceType ServiceType { get; set; } // Hskp , Maintenance , QA etc…

    // Relational Refs

    public virtual RentalUnit RentalUnit { get; set; }

    public virtual Property Property { get; set; }

    public virtual KeyRing KeyRing { get; set; }

    public virtual KeyHook KeyHook { get; set; }

    #region IValidatableObject Members

    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)


    // Must be assigned to either a property (association key) or a rentalunit

    // Can be assigned to a ring or a hook BUT not both

    // If its assigned to a ring then it must be ring of the same ‘ServiceType’

    // If its assigned to a hook then it must be hook belonging to a key board of the same ‘ServiceType’

    List<ValidationResult> result = new List<ValidationResult>();

    if (!validationContext.Items.ContainsKey("Context"))


    // NO context throw exception

    throw new Exception("No ValidationContext passed !");


    // Cast to our Context

    var context = (MeyerREContext)validationContext.Items["Context"];

    if (context == null) throw new Exception("Cannot cast context to ‘MeyerREContext’!");

    // is it assigned to either a property (association key) or a rentalunit

    if (RentalUnit == null && Property == null)


    result.Add(new ValidationResult("Key MUST be assigned to a Rental Unit OR an Association Condo Unit !"));

    return result;


    // is it assigned to either a property (association key) or a rentalunit

    if (RentalUnit != null && Property != null)


    result.Add(new ValidationResult(string.Format("Key CANNOT be assigned to BOTH a Rental Unit AND an Association Condo Unit ! \n {0} \n {1}",



    return result;


    // is it assigned to BOTH a ring and a hook ?

    if (KeyHook != null && KeyRing != null)


    result.Add(new ValidationResult("Key CANNOT be assigned to BOTH a Key-Hook & a King-Ring !"));

    return result;


    // it HAS to be assigned to one or the other however

    if (KeyHook == null && KeyRing == null)


    result.Add(new ValidationResult("Key MUST be assigned to a Key-Hook OR a King-Ring !"));

  8. Hi Julie,

    Been watching the course and enjoying it.

    We’re currently using the Designer and a broadly DB-first workflow (with no code-gen of DBContext hence we’re getting ObjectContext (boy do we need names for these things!)). This is mainly because we have WCF RIA Services using the EF model to do its magic.

    We can probably tweak RIA to work with a Code-First / DBContext instead but can you comment on whether / how this ‘multiple bounded contexts for one DB schema’ can be implemented when using a Designer-generated model?

  9. @Rohan …sorry I don’t recall getting emails about recent comments. Tricky with model first. I guess the key would be to let model first generate DDL for each different model and then you’ll have to combine and modify that SQL to get the database as you want it. It’s just an idea. I haven’t tried it. So you better test first.

  10. Julie,

    Great videos. Just a question, you mention in the video about your solution file being available for download, where can I get that?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.