这是我用CodeSmith的一个页面添加修改数据表的模板
.CS
1
<%@ CodeTemplate Language="C#" TargetLanguage="C#"
2
Description="Generates a class including a special informational header" %>
3
4
<%@ Property Name="NameSpace" Type="String"
5
Category="Context"
6
Description="The namespace to use for this class" %>
7
8
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema"
9
Category="Context"
10
Description="Table that the stored procedures should be based on." %>
11
<%@ Assembly Name="SchemaExplorer" %>
12
13
<%@ Import Namespace="SchemaExplorer" %>
14
15
<%@ Property Name="folder" Type="String"
16
Category="Context"
17
Description="The name of the class to generate" %>
18
19
<%@ Property Name="DevelopersName" Type="String"
20
Category="Context"
21
Description="The name to include in the comment header" %>
22
using System;
23
using System.Collections;
24
using System.ComponentModel;
25
using System.Data;
26
using System.Drawing;
27
using System.Web;
28
using System.Web.SessionState;
29
using System.Web.UI;
30
using System.Web.UI.WebControls;
31
using System.Web.UI.HtmlControls;
32
33
namespace QuMeiXJ.Webs.<%=folder %>
34
}
aspx:2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
1
>