I need to create a RESTful webservice in C#. This is what I have right now:
namespace WebService
{
[ServiceContract]
public interface IService
{
[OperationContract(Name="Add")]
[WebGet(UriTemplate = "/")]
int Add();
}
public class Service:IService
{
public int Add()
{
// do some calculations and return result
return res;
}
}
}
Now, my question is How do i host this service at a location say (http://localhost/TestService) and how can i test the service in console application client?