-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cst
46 lines (42 loc) · 1.42 KB
/
Main.cst
1
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
35
36
37
38
39
40
41
42
43
44
45
46
<%@ CodeTemplate Language="C#" ResponseEncoding="UTF-8" TargetLanguage="Text" Src="" Inherits="" Debug="False" Description="Mysql三层架构模板"
Output="None"%>
<%@ Property Name="SourceTables" Type="SchemaExplorer.TableSchemaCollection" Default="" Optional="False" Category=""%>
<%@ Register Name="CreatSingleTable" Template="CreatSingleTable.cst" MergeProperties="False" ExcludeProperties="" %>
<%@ Property Name="RootNamespace" Default="MySqlMVC" Type="System.String" Optional="False"%>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Assembly Name="System.Data" %>
<%@ Import Namespace="SchemaExplorer" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Collections" %>
<script runat="template">
private string _outputDirectory = String.Empty;
[Editor(typeof(System.Windows.Forms.Design.FolderNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
[Description("The directory to output the results to.")]
public string OutputDirectory
{
get
{
return _outputDirectory;
}
set
{
if (value != null && !value.EndsWith("\\"))
{
value += "\\";
}
_outputDirectory = value;
}
}
</script>
<%
foreach(TableSchema ts in SourceTables)
{
CreatSingleTable s = new CreatSingleTable();
s.SourceTable = ts;
s.RootNamespace = RootNamespace;
s.OutputDirectory = OutputDirectory;
s.Render(this.Response);
}
%>
<script runat="template">
</script>