Blog

Blog posts on .NET, Azure, and more.

Run EF Core Migrations in Azure DevOps

December 06, 2020 by Anuraj

Azure DevOps EFCore

This post is about running Entity Framework Core migrations on Azure DevOps which helps you to continuously deploy your database changes to your staging or your QA environments or even to production - even though I won’t recommend it. We will be using Entity Framework Core Code first approach.

How to do OAuth2 Authorization in ASP.NET Core for Swagger UI using Swashbuckle

December 05, 2020 by Anuraj

OpenAPI AspNetCore OAuth2

This post is about documenting OAuth 2 protected ASP.NET Core Web API using Swashbuckle. Last post - Securing Your Web API Using Azure Active Directory I wrote about securing web api with Azure Active Directory. In ASP.NET Core Web API, Open API will be enabled by default. To enable OAuth2 authentication, first we need to write the following code. I this code we are adding a SecurityDefinition with OAuth2 type. And also configuring Authentication URL, Token URL and Scopes.

Securing Your Web API Using Azure Active Directory

December 03, 2020 by Anuraj

Azure WebApi AspNetCore

This post is about securing your asp.net core web api applications using Azure Active Directory. First let’s create an Azure Active Directory application which helps you to protect the application.

OpenAPI and Versioning for ASP.NET Core Web API

December 01, 2020 by Anuraj

OpenAPI AspNetCore

This post is about how to enable and use Open API for ASP.NET Core Web API with versioning enabled. I have created a Web API project in ASP.NET Core 5.0, so Open API is enabled by default. Next I am adding the Microsoft.AspNetCore.Mvc.Versioning package to enable versioning support. And I am enabling version support using the following code in Startup.cs - ConfigureServices method.

How to add Open API support for Azure Functions

November 26, 2020 by Anuraj

Azure OpenAPI Serverless

This post is about documenting Azure Functions using Open API. Similar to ASP.NET Core, Open API support for Azure Functions is also simple and straight forward.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub