Skip to content

Instantly share code, notes, and snippets.

@yaplex
Created June 19, 2017 20:38
Show Gist options
  • Save yaplex/9e3823a25f93407bc3b6570eb57ca5e9 to your computer and use it in GitHub Desktop.
Save yaplex/9e3823a25f93407bc3b6570eb57ca5e9 to your computer and use it in GitHub Desktop.
namespace WebApplication1
{
using System.ServiceModel;
using System.ServiceModel.Activation;
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class CityService
{
// Add [WebGet] attribute to use HTTP GET
[OperationContract]
public string DoWork(string userName)
{
// Add your operation implementation here
return "Hello " + userName;
}
// Add more operations here and mark them with [OperationContract]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment