Category: C#

.Net 5 Web API With Repository Pattern Docker and PostgreSQL

Before we start coding make sure your environment is ready. Make sure you have .net 5 sdk install in your machine. If not download it form this link https://dotnet.microsoft.com/download/dotnet/5.0 We will also use docker in this tutorial, so make sure to install it. You can get docker from this link https://www.docker.com/products/docker-desktop We will be using … Continue reading .Net 5 Web API With Repository Pattern Docker and PostgreSQL

Policy Based Authorization in Asp.Net Core Web Api

In the previous article we implement user authentication and secure our api endpoint using Authorize attribute. The Authorize attribute allowed us to make sure that only logged in users can access our api. In a real world application we only want to allow a certain type of users to access some part of the api. … Continue reading Policy Based Authorization in Asp.Net Core Web Api