如何在代码史密斯中使用数据库的当前存储过程来创建模板?

How to use current stored procedure of database in code smith for create template?

我有一个数据库并在其中创建了更多存储过程,现在我想在代码史密斯中使用当前创建的存储过程并从中创建模板。 怎么办?

例如,在代码生成器中使用 table 编写以下内容 属性 :

<%@ Property Name="SourceTables" Category="Database" Optional="True" Type="SchemaExplorer.TableSchemaCollection" 
Description="The database tables" %>

如何编写存储过程????

<%@ Property ..... Type="**SchemaExplorer.???**" ...

我在 CodeSmith Tools 工作,已经有一个模板可以执行您想要创建存储过程的操作。它可以在 Database/StoredProcedures 文件夹中找到。网上也可以找到源码here.

如果您希望通过 属性 与存储过程进行交互,您可以通过 CommandSchema 类型来实现。

<%@ Property Name="SourceCommands" Category="Database" Optional="True" Type="SchemaExplorer.CommandSchemaCollection" 
Description="The database stored procedures" %>