Created
June 19, 2017 20:38
-
-
Save yaplex/9e3823a25f93407bc3b6570eb57ca5e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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