来自MVC4的REST API调用 [英] REST API call from MVC4

查看:82
本文介绍了来自MVC4的REST API调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好 -



任何人都可以告诉我如何从mvc4进行休息api通话



提前致谢

Hi All-

Can anyone pls tell me how to do a rest api call from mvc4

Thanks in advance

推荐答案

在大学里提供作业,以帮助您学习和/或巩固在课程中传授的知识。



首先要做的是你的课程笔记 - 他们应该提供回答这项任务所需的全部知识。如果他们没有,那么你应该和你的导师谈谈。



无论如何,与你的导师交谈是个好主意 - 这就是他们的目的!他们应该能够引导你朝着正确的方向前进。



但是,有时会给予一项任务以鼓励你学习如何进行研究。在此论坛上发布问题不构成研究。



谷歌(或Bing等)通常是一个很好的起点...发布到你最喜欢的搜索引擎通常用于建模的不同类型的模式数据仓库它将在不到一秒的时间内为您提供大约140k的结果。我发现的那些这个 [ ^ ]给出了一个很好的解释,并包含了进一步阅读的参考资料。
Assignments are given in college to help you learn and/or to cement the knowledge that is imparted during the course.

The first place to start is your course notes - they should supply all of the knowledge required to answer this assignment. If they don't then you should talk to your tutor.

Talking to your tutor is a good idea anyway - that is what they are there for! They should be able to guide you in the right direction.

Sometimes, however, an assignment is given to encourage you to learn how to do research. Posting a question on this forum does not constitute "research".

Google (or Bing etc) is often a good place to start... post into your favourite search engine "the different classes of schemas that are popularly used for modelling data warehouses" and it will give you around 140k results in less than a second. Of those that I found this[^] gives a good explanation and includes references for further reading.


在.NET世界中,要创建RESTful Web服务,我们使用WEB API: http:// www .asp.net / web-api [ ^ ]



然后我们也可以使用如下所述的URL调用ASP.NET MVC应用程序中的REST API(或任何其他REST服务):



http://stackoverflow.com/questions/21683125/how-to-consume-rest-service-from-a-mvc-4-web-application [ ^ ]



使用ASP.NET使用ASP.NET MVC4和RestSharp的WEB API [ ^ ]



希望有人帮助你。
In .NET world, to create RESTful web service we use WEB API : http://www.asp.net/web-api[^]

Then we can make call to that REST API (or any other REST service) from ASP.NET MVC application too using URL as described here:

http://stackoverflow.com/questions/21683125/how-to-consume-rest-service-from-a-mvc-4-web-application[^]

Consuming ASP.NET WEB API using ASP.NET MVC4 and RestSharp[^]

Hope those will help you.


这篇关于来自MVC4的REST API调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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