private void UpdateObject(SqlObject source, SqlObject destination) { switch (source.Type) { case SqlObjectType.Table: UpdateTables(source as SqlTable, destination as SqlTable); break; case SqlObjectType.Type: UpdateTypes(source as SqlType, destination as SqlType); break; default: _syncScript.Add(new SyncAction { Name = source.Name, Text = source.CreateScript(), Type = GetCreateActionType(source.Type) }); _syncScript.Add(new SyncAction { Name = destination.Name, Text = destination.DropScript(), Type = GetDropActionType(destination.Type) }); break; } }
private void CreateObject(SqlObject obj) { switch (obj.Type) { case SqlObjectType.Table: TablesSynchroniser.CreateTable(obj as SqlTable, _syncScript); break; default: _syncScript.Add(new SyncAction { Name = obj.Name, Text = obj.CreateScript(), Type = GetCreateActionType(obj.Type) }); break; } }