public static void ChangeSpecificObjectSchema(this IAlterProcessor proc, SpecificObjectInfo obj, string newSchema) { var view = obj as ViewInfo; if (view != null) { proc.ChangeViewSchema(view, newSchema); } var sp = obj as StoredProcedureInfo; if (sp != null) { proc.ChangeStoredProcedureSchema(sp, newSchema); } var func = obj as FunctionInfo; if (func != null) { proc.ChangeFunctionSchema(func, newSchema); } }