%@ 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 service
///Interface FOR TABLE <%=this.SourceTable.Name%>
///By wm  
///on <%= DateTime.Now.ToString("MM/dd/yyyy")%>
/// 
  
 using System.Collections.Generic; 
using System.ServiceModel; 
using System.ServiceModel.Web; 
using DeiNiu.wms.Data.Model.Wcf;
using DeiNiu.Wcf.erp.wcfData;
using DeiNiu.Utils;
namespace DeiNiu.Wcf
{
    [ServiceContract]
    public interface <%=getWcfSvcInterfaceName() %>
    {
        //http://localhost:8080/<%=getTableName()%>.svc/getobj?id=1
        [OperationContract]
        [WebInvoke(Method = "GET",RequestFormat = WebMessageFormat.Json,ResponseFormat = WebMessageFormat.Json,
            UriTemplate = "getObj?id={id}")]
        <%=getWcfClassName() %> getObj(int id);
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
            UriTemplate = "add")]
        enumDbResult add(<%=getWcfClassName() %> obj);
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
           UriTemplate = "update")]
        enumDbResult update(<%=getWcfClassName() %> obj);
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
         UriTemplate = "delete")]
        enumDbResult delete(<%=getWcfClassName() %> obj);
        [OperationContract]
        [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
         UriTemplate = "where?condition={condition}&pageno={pageno}")]
        <%=getWcfClassName() %>List query(string condition, int pageno); 
        /*
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
            UriTemplate = "addList")]
         List addList(List<<%=getWcfClassName() %>> objs);
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
           UriTemplate = "updateList")]
         List updateList(List<<%=getWcfClassName() %>> objs);
        [OperationContract]
        [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
         UriTemplate = "deleteList")]
         List deleteList(List<<%=getWcfClassName() %>> objs);
         */
    }
}