以json格式提供的restful wcf service post方法响应 [英] restful wcf service post method reponse in json format
本文介绍了以json格式提供的restful wcf service post方法响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
http:// localhost:8005 / Service1.svc / AddData
我需要返回如下所示的数据(输出),
条件1:如果两者都保存在db中没有任何错误,
http://localhost:8005/Service1.svc/AddData
And i need to return data (output) like below,
Condition 1: If both saved in db without any error,
{"sjSonData":[{
"success":true
}]}
条件2:假设任何一个数据都无法保存在数据库中,那么< br $>
Condition 2: Suppose any one data failed to save in database then
{"sjSonData":[
{
"log_Id":1,
"success":false
},
{
"log_Id":2,
"success":true
}
]}
推荐答案
这篇关于以json格式提供的restful wcf service post方法响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文