comparison Source/Templates/WCFAttributes.ttinclude @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
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 #>