protected DACBase(string connectionString, ILogger logger = null) { ConnectionString = connectionString; Log = logger ?? new NoOpLogger(); _artificialKeys = null; DefaultIsolationLevel = IsolationLevel.ReadCommitted; UseScopeOsmosis = true; InstanceID = Guid.NewGuid(); }
public DBSchema ApplyArtificialKeys(ArtificialKeys artificialKeys) { if (artificialKeys == null) { throw new ArgumentNullException("artificialKeys"); } if (artificialKeys.Tables == null) { throw new ArgumentException("Artificial Keys did not contain any tables", "artificialKeys"); } artificialKeys.ApplyToSchema(this); return(this); }
public DBSchema GetSchema() { using (var scope = this.BeginScope()) { var schema = new DBSchema { DatabaseID = this.ConnectionString, Tables = NormalizeTables(GetDenormalizedTableDescriptions()), Triggers = NormalizeTriggers(GetDenormalizedTriggerDescriptions()), SQL = string.Empty }; if (ArtificialKeys != null) { ArtificialKeys.ApplyToSchema(schema); } schema.FinishedBuilding(); return(schema); } }