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得到数据表中的主键集合.

相关文章:

  • 2021-10-06
  • 2021-07-09
  • 2022-03-03
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-29
  • 2022-03-04
  • 2022-02-12
  • 2021-12-02
  • 2021-11-06
  • 2021-06-07
相关资源
相似解决方案