This file contains hidden or 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
private static void ConfigInMemoryDb(IServiceCollection services) | |
{ | |
var connection = new SqliteConnection("DataSource=:memory:"); | |
connection.Open(); | |
services.AddSingleton(sp => connection); | |
var options = new DbContextOptionsBuilder<MyContext>() | |
.UseSqlite(connection) | |
.Options; | |
using (var context = new MyContext(options)) | |
{ |
Ways to do things (from Peter Bourgon)
// Actor model (state machine)
type stateMachine struct {
state string
actionc chan func()
}