Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var options = new DbContextOptionsBuilder<MyDbContext>()
.UseInMemoryDatabase(databaseName: "Test")
// Don't raise the error warning us that the in memory db doesn't support transactions
.ConfigureWarnings(w => w.Ignore(InMemoryEventId.TransactionIgnoredWarning))
var dbContext = new MyDbContext(options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment