好记性不如烂笔头。

CodeSmith Get SQL Functions

The first thing you need to do in order to use SQL Functions is to set the IncludeFunctions Property on any type that derives from SchemaObjectBase. The following property types are capable of showing functions when you add the IncludeFunctions="True" setting to the property: CommandSchema, CommandSchemaCollection and DatabaseSchema.

<%@ Property Name="SourceDatabase" Type="SchemaExplorer.DatabaseSchema" Category="Required" Description="Database that contain the stored procedures." IncludeFunctions="True" %>

Now your SQL Functions will show up in SchemaExplorer when you iterate over your commands.

<% foreach (CommandSchema command in SourceDatabase.Commands) { %>

Name: <%= command.Name %>

<% } %>