1.如果要调用数据库中的表,请引用CodeSmith的SchemaExplorer
<%@ Assembly Name="SchemaExplorer" %>
<%@ Import Namespace="SchemaExplorer" %>
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context"  Description="Table that the stored procedures should be based on." %>
如果想访问视图的话,则将变量类型Type中的SchemaExplorer.TableSchema修改为SchemaExplorer.ViewSchema即可。
2.使用SourceTable.NonPrimaryKeyColumns即可得到非主键字段的集合,然后再使用SourceTable.PrimaryKey.MemberColumns得到数据表中的主键集合.
posted on 2007-02-02 12:33  网碾平  阅读(390)  评论(0编辑  收藏  举报