Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created October 16, 2018 00:40
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 dcomartin/197f47363211aaeabe22833675bfb50f to your computer and use it in GitHub Desktop.
Save dcomartin/197f47363211aaeabe22833675bfb50f to your computer and use it in GitHub Desktop.
var connection = new SqliteConnection("DataSource=:memory:");
connection.Open();
var options = new DbContextOptionsBuilder<MyDbContext>()
.UseSqlite(connection)
.Options;
var dbContext = new MyDbContext(options);
dbContext.Database.EnsureCreated();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment