请问有谁用过Codesmith啊?有个问题我一直解决不了,是我错了吗?

ainty 2008-12-07 04:18:42
<%@ CodeTemplate Language="C#" TargetLanguage="C#" ResponseEncoding="UTF-8" Debug="False" Description="Template description here." %>
<%@ Property Name="StoredProcedures" Type="SchemaExplorer.CommandSchemaCollection" Category="Microsoft DataBase" Description="Stored procedure(s) from which to extract descriptions" %>

<% foreach(CommandSchema comm in StoredProcedures)
{
foreach(ParameterSchema ps in comm.AllInputParameters)

{
%>
///<param name=""><%=ps.Description.ToString()%></param>
<%
}
}%>

为什么ps.Description总是取不到值呢?请各位求助!谢谢!
...全文
122 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ainty 2008-12-07
  • 打赏
  • 举报
回复
究竟在数据库中怎么样对存储过程参数标记注释,才能让codesmith的ParameterSchema.Description方法获取得到呢?
ainty 2008-12-07
  • 打赏
  • 举报
回复
数据库里面的存储过程如下:
create PROCEDURE [dbo].[TestProcedure]
@tblName nvarchar(30), --数据库表名
@strGetFields nvarchar(100) = '*', -- 需要返回的列
@strOrder nvarchar(30)='', -- 排序的字段名
@startIndex int=1,
@endIndex int=50,
@strWhere nvarchar(100) = '', -- 查询条件
@ResultCount int output

AS

我用的是Codesmith 5.03版本,是不是我用的版本用问题?
数据库是SQL2005,究竟怎么样才能取得存储过程参数的Description呢?

ParameterSchema.Description.ToString()为什么取不到?怪哦

111,130

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧