如何创建一个api [英] how to create an api

查看:107
本文介绍了如何创建一个api的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c sharp asp.net为我创建的Web应用程序创建api?

How to create an api for my created web application using c sharp asp.net??

推荐答案

API只不过是其他人可以使用的接口用于与您的应用程序配对.

1)确定要向外界公开的功能.
2)在WEB场景中,为您的功能创建WEB服务(或WCF等).
3)记录您的接口,以供其他人使用.
An API is nothing more than an interface that other people can use to couple with your application.

1) Decide what functionality you would like to expose to the outside world.
2) In a WEB scenario create WEB Services (or WCF etc.) for your functionality.
3) Document your interface for other people to use.


API定义了"应用程序编程接口(API)是基于源代码的规范,旨在被软件用作接口相互通信的组件.API可能包括例程,数据结构,对象类和变量的规范.( source:wiki )"

意味着您需要创建一个可以通过Web应用程序调用的Classlibrary(DLL).

如何在C#.net中创建DLL [ ^ ]
API defines "An application programming interface (API) is a source code based specification intended to be used as an interface by software components to communicate with each other. An API may include specifications for routines, data structures, object classes, and variables.(source:wiki)"

Means you need to create a Classlibrary (DLL) that you can call through web applications.

how to crete DLL in C#.net[^]


这篇关于如何创建一个api的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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