How to overload methods in WCF Service
Solution: How to overload methods in WCF Service:
using System.ServiceModel; [ServiceContract] public interface IMyService { [OperationContract( Name="GetData ")] /// for accessing the method of wcf service by uri [WebGet(RequestFormat = WebMessageFormat.Xml, UriTemplate = "GetData")] List<product> getData();
[OperationContract(Name = "GetData with Parameter" )] [WebGet(RequestFormat = WebMessageFormat.Xml, UriTemplate = "GetData /{ID}")] product HelloWorld( string name); } } |
You directly copied my link without my permission. Removed it otherwise I will send DMCA notice to hosting provider blogger which will disable your blog.
ReplyDelete