Last active
December 23, 2015 23:48
-
-
Save PaulSorensen/6712023 to your computer and use it in GitHub Desktop.
egeek.dk - WCF return JSON, AJAX-enabled WCF Service in less than 3 minutes
This file contains 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
[OperationContract] | |
public string HelloWorld(string personName) | |
{ | |
return (new HelloWorldWrapper | |
{ | |
Response = string.Format("Hello, {0}", personName), | |
Error = "", | |
TimeExecuted = DateTime.Now.ToString(CultureInfo.InvariantCulture) | |
}).ToJson(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment