0
|
1 <#
|
|
2 {
|
|
3 var wcfPrevBeforeGenerateModel = BeforeGenerateModel;
|
|
4
|
|
5 BeforeGenerateModel = tt =>
|
|
6 {
|
|
7 wcfPrevBeforeGenerateModel(tt);
|
|
8
|
|
9 Usings.Add("System.Runtime.Serialization");
|
|
10
|
|
11 foreach (var t in Tables.Values)
|
|
12 t.Attributes.AddRange(new[]
|
|
13 {
|
|
14 "Serializable",
|
|
15 "DataContract" + (DataContractNamespace == null ? "" : "(Namespace=\"" + DataContractNamespace + "\")")
|
|
16 });
|
|
17
|
|
18 foreach (var t in Tables.Values)
|
|
19 foreach (var c in t.Columns.Values)
|
|
20 c.Attributes.Add("DataMember");
|
|
21 };
|
|
22 }
|
|
23 #><#+
|
|
24 string DataContractNamespace = null;
|
|
25 #> |