In this tutorial, we are going to cover the communication between microservices using RabbitMQ and MassTransit with Asp.Net Core 5. In the previous tutorial, we have discussed Microservices Architecture with Ocelot API gateway in Asp.Net Core 5.
[Read more…]Implement API Versioning in Asp Net Core 5 Web API
In this article, we are going to cover an Asp Net Core 5 web API Versioning example. There are many approaches to versioning APIs. And in this article, we will see how to implement API versioning in Asp Net Core 5 web API application. So, first-of-all, we will create an Asp Net Core 5 web API and then we will see how to implement API versioning and different aspects of API versioning.
[Read more…]Asp Net Core 5 web API token based authentication example using JWT
In this tutorial, we are going to cover a web api token based authentication example using JWT in Asp.Net Core 5 using visual studio 2019. So, first-of-all, we will create a new Asp.Net Core 5 web API project and then we will see how to implement Microsoft Identity and then finally we will see how to implement token based authentication using JWT in Asp.Net Core 5 web API app.
[Read more…]Key Vault secrets in Asp.Net Core 3.1
In this tutorial, we are going to discuss Azure Key Vault secrets using Asp.Net Core 3.1 web application. Azure Key Vault is a tool where we can store and access secrets. The purpose of Key Vault is to store sensitive information like API keys, Authenticated Token Keys, Database Connection strings and etc. This is the best cloud-based solution for Azure web Apps.
[Read more…]User Secrets in Asp.Net Core 3.1
In this tutorial, we are going to cover user secrets in Asp.Net Core 3.1 web application using visual studio code. First, we will understand what is secret manager in asp.net core and then we will implement all the user secrets options (E.g. set, remove, list, clear) in Asp.Net Core 3.1 web API application in step by step.
[Read more…]JWT Authentication in Asp.Net Core 3.1
In this tutorial, we are going to cover jwt authentication in Asp.Net Core 3.1 web api in visual studio code. We will see how to implement identity, and then we will see how to implement token based authentication in Asp.Net Core 3.1 web API, and then finally we will test our API using postman.
[Read more…]CQRS and Mediator Patterns in Asp.Net Core 3.1
In this tutorial, we are going to cover the CQRS(Command Query Responsibility Segregation) pattern in Asp.Net Core 3.1 web api application. We will see how to implement CQRS in a very basic CRUD application using the MediatR library. MediatR library is an open source implementation of mediator pattern for .NET Applications.
[Read more…]Asp.Net Core 3.0 Web API Versioning best practices
In this tutorial, we are going to cover Asp Net Core 3.0 Web API Versioning best practices using Visual Studio 2019. We will see different ways to implement API versioning in Asp.Net Core 3.0 application like URL based versioning, Query string based versioning, and then header based versioning. In one of the previous tutorials, we have discussed how to create web API in Asp.Net Core 3.0 application and then we have also discussed Asp Net Core 3.0 Web API token based authentication using JWT in visual studio 2019. So, let’s see how to implement API Versioning in Asp.Net Core 3.0 web API application.
[Read more…]How to create a .NET Core 3.0 trimmed self-contained single executable app using VS Code
In this tutorial, we are going to learn how to create a Asp.NET Core 3.0 trimmed self-contained app using visual studio code. In this way we can share our application without installing .NET SDK on the target machine. So, first-of-all, we will create an Asp.Net Core 3.0 app, then we will publish it as self-contained app and then we will see how to reduce the files using PublishSingleFile flag and then we will see how to reduce the size of executable using PublishTrimmed flag which is a new feature of .NET Core 3.0 Preview 6.
[Read more…]How to add NSwag to Asp Net Core 3.0 web API and generate client code using NSwagStudio
In this tutorial, we are going to cover how to add NSwag to Asp Net Core 3.0 web API using Visual Studio 2019 preview. NSwag is a Swagger/OpenAPI 2.0 and 3.0 API toolchain for .NET Core, .NET, Web API, TypeScript, Angular, and other platforms which is written in c#. The swagger specification uses JSON and JSON schema to describe a RESTful web API. The NSwag project provides tools to generate swagger specifications from existing Asp.Net web API controllers and client code from these swagger specifications.
[Read more…]