开发者

RESTful WCF Service: Sending back user confirmation

In my Rest WCF project I am saving data to DB. My question is when the user sends data to my wcf service, I need to validate the data and if there is any error how can I inform it back to the user? And once data is s开发者_如何学Cuccessfully saved to Database , I need to send a confirmation to the user saying "Data successfully saved". How can I do this. Thanks in advance for your help.


Use the HttpStatusCode:

WebOperationContext context = WebOperationContext.Current;
context.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.OK;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜