Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Entity Framework Code First Model Cache

With the release of Entity Framework 6.2, it introduces the Entity Framework Code First Model Cache.  Giving you the ability to load a prebuilt edmx when using code first, instead having EF generate it on startup. This can provide a some savings on startup time. With these changes, first AppDomain calls to context.Database.Initialize for a model with just over 600 models and a null initializer dropped from 12-14 seconds to about 1.9 seconds after the edmx was written, saving 10-12 seconds on initialization. The first call to write the edmx still ran in 12-14 seconds (no noticeable delay added). #275… Read More »Entity Framework Code First Model Cache

Null Hot Potato

First, full credit for the term “Null Hot Potato” goes to Reid Evans.  He was presenting his talk “C# Without Nulls or Exceptions” at our local Windsor-Essex .NET Developers group.  I don’t want to give away the talk, because I hope it gets posted online so you can watch it yourself.  But I do want to dive into this one specific thing that Reid described as of the Null Hot Potato. Not My Problem It’s really a case of passing the responsibility.  If your method handles null with null checks, but returns null, your just “passing the buck”.  You’re basically… Read More »Null Hot Potato

Porting to Entity Framework Core

I’ve used the newer Entity Framework Core on a couple projects just to give it a test drive in the v1.0 era.  It felt very similar to Entity Framework 6.  I figured since it seemed so similar, porting wouldn’t be too difficult.  So I bit the bullet and finally decided to port an application that uses Entity Framework 6 over to Entity Framework Core 2.0.  Here is a bit of an experience report on porting to Entity Framework Core. Side by Side In theory, you should be able to run EF 6 along side EF Core.  They are completely different… Read More »Porting to Entity Framework Core