using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; namespace RestService { // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IRestfulService" in both code and config file together. [ServiceContract] public interface IRestfulService { [OperationContract] [WebInvoke(Method = "post", ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "xml/{dbType}/{Query}/{Param}/{bSP}")] String XMLData(int dbType, string strQuery, List<KeyValuePair<string, object>> kvParam, bool bSP); [OperationContract] [WebInvoke(Method = "post", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "json/{dbType}/{Query}/{Param}/{bSP}")] String JSonData(int dbType, string strQuery, List<KeyValuePair<string, object>> kvParam, bool bSP); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)