Ways to do things (from Peter Bourgon)
// Actor model (state machine)
type stateMachine struct {
state string
actionc chan func()
}
// Actor model (state machine)
type stateMachine struct {
state string
actionc chan func()
}
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)) | |
{ |