艺海无涯,学无止境。欢迎一起探讨技术和人生,了解我

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 %>

<% } %>

相关的文章