Skip to content

Instantly share code, notes, and snippets.

@johanclasson
Created March 24, 2016 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johanclasson/228b526f727f3ed97f0c to your computer and use it in GitHub Desktop.
Save johanclasson/228b526f727f3ed97f0c to your computer and use it in GitHub Desktop.
using (var factory = new TestContextFactory())
using (var context = factory.CreateInMemorySqlite<MyContext>(migrate: true))
{
RunScenario(context);
}
// Or...
using (var factory = new TestContextFactory())
using (var context = factory.CreateInMemoryDatabase<MyContext>())
{
RunScenario(context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment