<%@ CodeTemplate Language="C#" TargetLanguage="Text" Description="This template demonstrates using properties defined in external assemblies." %> <%@ Property Name="SourceDatabase" Type="SchemaExplorer.DatabaseSchema" Category="Context" Description="Database that the documentation should be based on." %> <%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context" Description="The table to use for this sample." %> <%@ Assembly Name="SchemaExplorer" %> <%@ Import Namespace="SchemaExplorer" %> /// ///WCF Data Object ///BASIC CLASS FOR TABLE <%=this.SourceTable.Name%> ///By wm ///on <%= DateTime.Now.ToString("MM/dd/yyyy")%> /// using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Runtime.Serialization; using DeiNiu.wms.Data.Model; namespace DeiNiu.Wcf { #region <%=getWcfClassName() %> /// /// This object represents the properties and methods of a <%=getWcfClassName() %>. /// [DataContract] public class <%=getWcfClassName() %> { <% foreach (ColumnSchema column in this.SourceTable.Columns) { %> <%=getInternalDelcare4wcf(column) %> <% } %> public <%=getWcfClassName() %> () { } #region Public Properties <% foreach (ColumnSchema column in this.SourceTable.Columns) { %> <% //if(!isIgnoredProperty4wc(column)) {%> [DataMember] public <%=getType(column) %> <%= column.Name%>{ get {return _<%= column.Name%>;} set {_<%= column.Name%> = value;} } <% //} %> <% } %> #endregion public <%=getObjClassNameExt() %> getDbObject(){ <%=getObjClassNameExt() %> dbObj = new <%=getObjClassNameExt() %>(ID); <% foreach (ColumnSchema column in this.SourceTable.Columns) { %> <% if(!isIgnoredProperty4wc(column)) {%> dbObj.<%= column.Name%> = <%= column.Name%>; <% } %> <% } %> return dbObj; } public <%=getWcfClassName() %> getWcfObject( <%=getObjClassNameExt() %> dbObj){ <%=getWcfClassName() %> wcfObj = new <%=getWcfClassName() %>(); <% foreach (ColumnSchema column in this.SourceTable.Columns) { %> <% if(!isIgnoredProperty4wc(column)) {%> wcfObj.<%= column.Name%> = dbObj.<%= column.Name%>; <% } %> <% } %> return wcfObj; } } #endregion }