private EvolutionHistory GetEvolutionHistory(string databaseName) { var databaseSpecification = new DatabaseSpecification(databaseName); _genome.AddGenes(databaseSpecification); return(databaseSpecification.EvolutionHistory); }
private MigrationHistory GetMigrationHistory(string databaseName) { var databaseSpecification = new DatabaseSpecification(databaseName); _migrations.AddGenes(databaseSpecification); return(databaseSpecification.MigrationHistory); }
private MigrationHistory GivenCompleteMigrationHistory(IGenome migrations) { var databaseSpecification = new DatabaseSpecification("Mathematicians"); migrations.AddGenes(databaseSpecification); return(databaseSpecification.MigrationHistory); }
public void AddGenes(DatabaseSpecification db) { var dbo = db.UseSchema("dbo"); var mathematician = DefineMathematician(dbo); DefineContribution(dbo, mathematician); }
public void AddGenes(DatabaseSpecification databaseSpecification) { var dbo = databaseSpecification.UseSchema("dbo"); var speaker = DefineSpeaker(dbo); var session = DefineSession(dbo, speaker); var conference = DefineConference(dbo); var acceptance = DefineSubmissionWorkflow(dbo, session, conference); DefineSchedule(dbo, conference, acceptance); }
private void CreateMathematician(DatabaseSpecification db, SchemaSpecification dbo) { var table = dbo.CreateTable("Mathematician"); var id = table.CreateIdentityColumn("MathematicianId"); var unique = table.CreateGuidColumn("Unique"); var pk = table.CreatePrimaryKey(id); table.CreateUniqueIndex(unique); CreateMathematicianName(dbo, pk); }
private EvolutionHistory GivenCompleteEvolutionHistory(IGenome genome) { var databaseSpecification = new DatabaseSpecification("Mathematicians"); genome.AddGenes(databaseSpecification); return databaseSpecification.EvolutionHistory; }
public void Configure(DatabaseConfiguration options) { var rawDatabaseConfiguration = this.RawDatabaseConfiguration.Value; options.LocalOrRemote = rawDatabaseConfiguration.LocalOrRemote; options.DatabaseName = new DatabaseName(rawDatabaseConfiguration.DatabaseName); foreach (var keyValuePair in rawDatabaseConfiguration.ConnectionStringsByConnectionName) { var connectionSpecification = new ConnectionSpecification() { ConnectionName = new ConnectionName(keyValuePair.Key), ConnectionString = new ConnectionString(keyValuePair.Value) }; options.ConnectionsByConnectionName.Add(connectionSpecification.ConnectionName, connectionSpecification); } foreach (var keyValuePair in rawDatabaseConfiguration.LocalConnectionsByDatabaseName) { var localConnectionSpecification = new LocalConnectionSpecification() { DatabaseName = new DatabaseName(keyValuePair.Key), ConnectionName = new ConnectionName(keyValuePair.Value) }; options.LocalConnectionsByDatabaseName.Add(localConnectionSpecification.DatabaseName, localConnectionSpecification); } foreach (var keyValuePair in rawDatabaseConfiguration.DatabaseServersByDatabaseName) { var databaseSpecification = new DatabaseSpecification() { DatabaseName = new DatabaseName(keyValuePair.Key), ServerName = new DatabaseServerName(keyValuePair.Value) }; options.DatabaseServersByDatabaseName.Add(databaseSpecification.DatabaseName, databaseSpecification); } foreach (var keyValuePair in rawDatabaseConfiguration.DatabaseServerAuthenticationsByServerName) { var databaseServerSpecification = new DatabaseServerSpecification() { ServerName = new DatabaseServerName(keyValuePair.Key), AuthenticationName = new AuthenticationName(keyValuePair.Value) }; options.DatabaseAuthenticationsByServerName.Add(databaseServerSpecification.ServerName, databaseServerSpecification); } foreach (var keyValuePair in rawDatabaseConfiguration.DatabaseServerLocationsByServerName) { var databaseServerLocation = new DatabaseServerLocation() { ServerName = new DatabaseServerName(keyValuePair.Key), DataSource = new DataSource(keyValuePair.Value) }; options.DatabaseServerLocationsByServerName.Add(databaseServerLocation.ServerName, databaseServerLocation); } }
public void AddGenes(DatabaseSpecification db) { var dbo = db.UseSchema("dbo"); CreateMathematician(db, dbo); }