Create API with ASP.NET Core (Day2): Creating API in ASP.NET Core


This article of the series “Web API with ASP.NET Core” will focus on creating Web API with ASP.NET Core. In the last article of the series, we learned about ASP.NET Core basics and how to set up an empty solution and play with request pipeline and middleware. In this article, we’ll discuss less theory and try to create an API. We’ll make use of ASP.NET Core MVC Middleware to build the API. We’ll cover in details on how to return resources, data and how to talk to API via HTTP request in this article. We can use the same source code as we got at the completion of last article of the series.

Continue reading “Create API with ASP.NET Core (Day2): Creating API in ASP.NET Core”


Create API with ASP.NET Core (Day 1): Getting Started and ASP.NET Core Request Pipeline


This tutorial will focus on ASP.NET Core features, request pipeline, how to create an ASP.NET Core API and how to use an Entity Framework Core. We willl try to create an API with an ASP.NET Core and tries to establish the communication with the database to perform simple CRUD operations via an Entity Framework Core. The series will contain continuation articles to cover the topic in detail and we will end up having a functional Application.

Continue reading “Create API with ASP.NET Core (Day 1): Getting Started and ASP.NET Core Request Pipeline”

Formatters And Content Negotiation In ASP.NET Web API 2


As the title suggests, this article will focus on the practical aspects of the formatters and the content negotiation in ASP.NET Web API. This article will explain what content negotiation is and why it is necessary, and how to achieve and get it working in ASP.NET Web API. The article will focus more on the implementation part of the content negotiation in Web API. The first part of the article will focus on the formatters, where it is described, how to support XML or JSON formats in Web API and how to format the result of the API. We’ll take a sample Web API project, that caters simple CRUD operations on the database, using the Entity Framework. We’ll not go into the details of underlying project architecture and the standard way of architecture of the same, but will focus on the content negotiation part in Web API projects. For creating a standard enterprise level Application with Web API, you can follow this series. You can find all the downloads related to this article at the end of the post.

Continue reading “Formatters And Content Negotiation In ASP.NET Web API 2”

CRUD operations using RESTful ASP.Net WebAPI and MongoDB




In my previous article, we did CRUD operations using MongoDB shell commands. As promised, here I am with this article sharing how to create RESTful Web API for CRUD operations in MongoDB using .NET drivers.

As you already know, MongoDB is the future of modern web applications and it is very important for .NET developers to get their hands on MongoDB drivers, so this article is my little effort in this direction. I hope you would like it and appreciate my work.

In this article, we are to going to create Web APIs for manipulating and performing CRUD operations on student resource of our project. Continue reading “CRUD operations using RESTful ASP.Net WebAPI and MongoDB”

Creating Self Hosted Asp.Net WebAPI with CURD operations in Visual Studio 2010


I have been writing a lot over WebAPIs in my Learning WebAPI series, but one crucial topic that I missed was hosting an WebAPI .

Hosting a WebAPI in IIS is pretty straight forward and is more similar to how you host a typical web application.In this article, I’ll explain how we can host a WebAPI in another process independent of IIS.

I’ll explain how to quickly create a WebAPI having CURD operations with Entity Framework 4.0 and then host it in an independent server.I’ll call the service endpoints through a console application acting as a client. You can use any client to check the service end points and verify their functionality. I’ll try to explain the topic with practical implementations , create a service and a test client in Visual Studio 2010 around target framework as .Net Framework 4.0.

Continue reading “Creating Self Hosted Asp.Net WebAPI with CURD operations in Visual Studio 2010”

RESTful Day #9: OData in ASP.NET Web APIs

Download Source Code


This is the last article of the RESTful series in which I’ll explain how you can leverage OData capabilities in WebAPI. I’ll explain what OData is and we’ll create OData enabled RESTful services. I’ll try to keep the article very concise with less theory and more practical implementations.

Continue reading “RESTful Day #9: OData in ASP.NET Web APIs”