Skip to content

Instantly share code, notes, and snippets.



Last active May 23, 2017
What would you like to do?
Pattern to enable cached code first models in EF 6.2
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
namespace MyApplication
public class MyDbConfiguration : DbConfiguration
public MyDbConfiguration() : base()
this.SetModelStore(new DefaultDbModelStore(Directory.GetCurrentDirectory()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment