Last active
May 23, 2017 00:22
-
-
Save divega/790d94247f43f4d598961db59c4071de to your computer and use it in GitHub Desktop.
Pattern to enable cached code first models in EF 6.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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