public void Init() { using (var context = new MySqlFullContext(Configuration)) { context.DropSchema(); context.CreateSchema(); } }
public static void TestInit(TestContext tstContext) { Configuration = Fluently.Configure().Database(MsSqliteConfiguration.Standard.ConnectionString("Data Source=:memory:;cache=shared;mode=memory")).Mappings( o => o.FluentMappings .AddFromAssemblyOf <Banking.Models.Context.Mappings.NHib.SqlServer.BankAccountMap>()).BuildConfiguration(); // Keep connection to in-memory db alive for duration of test // otherwise the db gets discarded when all connections are closed Context = new MySqlFullContext(Configuration); Context.CreateSchema(); }