private IEnumerable <string> GetHistorySchemas() { return (from migrationId in _migrationAssembly.MigrationIds let migration = _migrationAssembly.GetMigration(migrationId) select GetDefaultSchema(migration)); }
private XDocument GetInitialHistoryModel() { var initialHistoryModel = (from migrationId in _migrationAssembly.MigrationIds let migrationMetadata = (IMigrationMetadata)_migrationAssembly.GetMigration(migrationId) select new ModelCompressor().Decompress(Convert.FromBase64String(migrationMetadata.Target))) .FirstOrDefault(); if (initialHistoryModel == null) { using (var historyContext = new HistoryContext(CreateConnection(), true, null)) { initialHistoryModel = historyContext.GetModel(); initialHistoryModel .Descendants() .Each(a => a.SetAttributeValue(EdmXNames.IsSystemName, true)); } } return(initialHistoryModel); }