view Source/Templates/WCFAttributes.ttinclude @ 3:1ef98bd70424

!bug 100 +3h Исправление проблемы BLToolkit + mono 3.4
author cin
date Fri, 22 Aug 2014 17:34:46 +0400
parents f990fcb411a9
children
line wrap: on
line source

<#
	{
		var wcfPrevBeforeGenerateModel = BeforeGenerateModel;

		BeforeGenerateModel = tt =>
		{
			wcfPrevBeforeGenerateModel(tt);

			Usings.Add("System.Runtime.Serialization");

			foreach (var t in Tables.Values)
				t.Attributes.AddRange(new[]
				{
					"Serializable",
					"DataContract" + (DataContractNamespace == null ? "" : "(Namespace=\"" + DataContractNamespace + "\")")
				});

			foreach (var t in Tables.Values)
				foreach (var c in t.Columns.Values)
					c.Attributes.Add("DataMember");
		};
	}
#><#+
string DataContractNamespace = null;
#>