Create API with ASP.NET Core (Day 4): Working with Serializer Settings And Content Negotiation In ASP.NET Core API


Introduction

This article of the series “Web API with ASP.NET Core” will focus on topics like serializer strings and content negotiation. We learned how to deal with HTTP Status Codes and return sub resources in ASP.NET Core in last article and paused at Serializer Settings. We’ll continue to explore the importance of status codes and practical examples as well. We’ll also explore resource creation and returning the child resources as well 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 (Day 4): Working with Serializer Settings And Content Negotiation In ASP.NET Core API”

Advertisements

Create API with ASP.NET Core (Day 3): Working With HTTP Status Codes In ASP.NET Core API


Introduction

This article of the series “Web API with ASP.NET Core” will focus on topics like returning HTTP Status Codes from API, their importance, and returning sub resources. We learned how to create an API in ASP.NET Core and how to return resources, in last article, and paused at Status Codes. We’ll continue to explore the importance of status codes and practical examples as well. We’ll also explore resource creation and returning the child resources as well 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 (Day 3): Working With HTTP Status Codes In ASP.NET Core API”

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


Introduction

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


Introduction

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


Introduction

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


MongoDB-Logo-5c3a7405a85675366beb3a5ec4c032348c390b3f142f5e6dddf1d78e2df5cb5c

macbook-624707_640

Introduction

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


Introduction

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

Hosting a WebAPI in IIS is pretty straight forward and is more similar to how you host a typical asp.net 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”