i was searching google to know that how we can easily convert asmx service to wcf and there i saw people write code like
this is my old asmx service
[WebService(Namespace="http://kennyw.com/sampleservices/")]
public class MyService : System.Web.Services.WebService
{
[WebMethod]
public string Hello(string name)
{
return string.Format(“Hello {0}.”, name);
}
}
convert to wcf
[ServiceContract(Namespace="http://kennyw.com/WCFservices/")]
[WebService(Namespace="http://kennyw.com/sampleservices/")]
public class MyService : System.Web.Services.WebService
{
[WebMethod]
[OperationContract]
public string Hello(string name)
{
return string.Format(“Hello {0}.”, name);
}
}
i saw when converting then people is not using service contract interface. how it will work because i know that when we develop wcf service then i have to write one service contract interface for single service. so looking for discussion that how possible to develop wcf service without service contract interface. thanks