使用REST服务从数据库获取数据 [英] Get the data from database using REST service

查看:245
本文介绍了使用REST服务从数据库获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[OperationContract]
[WebGet(UriTemplate="/RolesSelectbyRoleName/{Name}",RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json,BodyStyle = WebMessageBodyStyle.Bare)]

Person GetaPerson(string Name);

I want to know what is RolesSelectbyRoleName in the above code ?Is it the name of a  stored procedure or tablename?

推荐答案

它获取并设置用于服务操作的统一资源标识符(URI)模板.
有关更多信息,请参见:
http://msdn.microsoft.com/en-us/library/system.servicemodel.web.webgetattribute.uritemplate.aspx [ ^ ]
It gets and sets the Uniform Resource Identifier (URI) template for the service operation.
Fore more information see :
http://msdn.microsoft.com/en-us/library/system.servicemodel.web.webgetattribute.uritemplate.aspx[^]


这篇关于使用REST服务从数据库获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆