What is ASP.Net Web API, what is RESTFul service, What is the difference between WCF and Web API and when to use over other. These are the main points which we going to discuss in this starting article, then we will create our own Web API project and look each and every single type of methods like get, post, put, delete. We will also use the Entity Framework to get and post the data to SQL Server.
ASP.Net Web API is a framework to build Web API Services, that means HTTP Based services on top of the .Net Framework.
It is commonly used to build RESTFul services, these services can be consume by different type of clients, like
ASP.Net Web API are mostly used for RESTFul service but we can also create services which are not restful in nature.
What is restful service REST stands for Representational State Transfer, which is an architectural style for networked hypermedia applications, it is primarily used to build Web services that are lightweight, maintainable, and scalable. A service based on REST is called a RESTful service, it was introduces first time in the year 2000.
WCF configuration is quite complex to use as RESTFul service while Web API is specially created for this purpose, easy to configure, easy to understan, easy to add routing
In next article we will create a ASP.Net Web API from scratch.
Having 13+ years of experience in Microsoft Technologies (C#, ASP.Net, MVC and SQL Server). Worked with Metaoption LLC, for more than 9 years and still with the same company. Always ready to learn new technologies and tricks.
|By Ali Adravi On 13 Jul, 17 Viewed: 1,382|
Token base authentication expires over a fixed time, to overcome on it we need to use the refresh token. We will try to create the token as well as the refresh token after successful login, refresh token will be used to generate a new token if current token is already expired and it is not too... By Ali Adravi On 08 Oct 2018 Viewed: 17,748
Create Token with user credential & roles and authorize action methods based on role in Web API is the topic we will cover in this article. We would need to pass token in every request and decorate action methods with [Authorize(Roles = "Admin, Manager") etc. that's only the code we will need to... By Ali Adravi On 04 Oct 2018 Viewed: 6,519
Upload file with data by clicking on button or by drag and drop, is the topic of this article. We will try to create an image gallery by uploading files and save data into database and images into a folder. We will try to create a component in a way that it can be used anywhere in entire... By Ali Adravi On 24 Sep 2017 Viewed: 41,050
Token base authentication with custom database by using OAuth in Web API is not complicated but documents are not very clear, many people try it and ended up with scratching their head, but you are on the right page so you will not be one of them. It is not required to create an empty project... By Ali Adravi On 11 Sep 2017 Viewed: 17,570
I found most of .Net developer whether they are ASP.Net developer or MVC developer, they face to start and how to create the Angularjs application structure. In this article we will start from an empty project with Web API 2.0. First of all we will create very simple application with three... By Ali Adravi On 18 Jul 2015 Viewed: 3,838