Building Minimal API endpoints from EF Core DbContext

This post is about building Minimal API endpoints from EF Core DbContext. When building APIs using EF Core and Minimal APIs, most of the time we will be writing the same code again and again. Recently I found a nuget package - InstantAPIs - this package helps to generate CRUD...


Working with Database First Approach in Entity Framework Core

This post is about working with Database First approach in Entity Framework Core. This approach is useful in scenario where we already got a Database and we need to generate model and db context classes. So for the demo purposes I am using an class library project and an ASP.NET...


Implementing paging in ASP.NET Core MVC

This post is about how to implement paging in ASP.NET Core MVC applications. For the implementation I am using a nuget package - X.PagedList.Mvc.Core. In the controller action method we need to set the page as the argument like this. public IActionResult Index(int? page = 1) { if (page !=...


Implementing Breadcrumbs in ASP.NET Core

This post is about how to implement breadcrumbs in ASP.NET MVC Core. A breadcrumb is a type of secondary navigation that shows a user’s current location in the website as well as the “history” of how he got there. In this post I am using a nuget package called -...


Automate Security Testing with ZAP and GitHub Actions

This post is about running automated security tests on your web application with the help OWASP ZAP and GitHub Actions. In GitHub actions, OWASP ZAP provides a baseline scan feature which helps to find common security faults in a web application without doing any active attacks. The ZAP baseline action...


Handling multiple submit buttons in a single form in ASP.NET Core

This post is about how to work with multiple submit buttons in aspnet core form. Sometimes you have to use multiple submit buttons in a single form in ASP.NET Core. In HTML forms we can do this with the help of formaction attribute. But this attribute will not work in...


Deploying a Static Site to Azure Using the az CLI

This post is about deploying a static sites to Azure storage account using Azure CLI and configuring GitHub actions to deploy the files. Recently I wrote a blog post on enabling Angular GZip encoding - in this post I am deploying the changes using Azure CLI and configuring a GitHub...


Setting up an Azure Virtual Machine as Azure DevOps build agent

This post is about how we can setup as Azure Virtual Machine as Azure DevOps build agent. Recently I had to provision one virtual machine as Azure DevOps build agent. First we need to create an Azure Virtual machine. I created one with default configuration values. Once it is created,...