Posts

ASP.NET Core 6: Communication across the API Applications using RabbitMQ and Background Service

Image
In this article, we will see the scenario where two APIs can communicate with each other using the Background Services and Messaging Service. The concept of REST APIs is not new for most of you and that too in most modern applications Microservices architectures are used where the server-side logic is written and deployed using the small REST APIs. These microservices are autonomous and isolated from each other. Since these microservices are deployed separately they do not know the existence of each other. In such a scenario what if one microservice wants to send or share data with another microservice? This is where the application architecture must use a background running messaging service. Consider the scenario where an E-Commerce application has two services one for accepting Order for Acceptance and Order Validation and another service for processing orders. In this case, if the received order is validated by the Order Acceptance service then it must be passed to the Order proces...

ASP.NET Core 6: Using Entity Framework Core with Oracle Database with Code-First Approach

Image
In this article, we will see how to use Oracle Database with Entity Framework Core with Code-First Approach. The reason behind writing a post on this is, recently while conducting training, one of my students raised the query regarding the EF Core with Oracle. Since Oracle is one of the most powerful databases, various enterprise applications are using it for the past several years and since the .NET Core is the most popular technology for building modern apps, the scenarios for accessing the Oracle database in .NET Core apps the use Entity Framework Core is common. Oracle Data Provider for .NET Entity Framework Core The Oracle Data Provider for .NET i.e. ODP.NET is used to access data from the Oracle database in the .NET Core apps using Entity Framework Core. This uses the Oracle.EntityFrameworkCore.dll, a managed library. This data provider allows using Code-First and Database-First approaches to perform Read/Write Operations with Oracle database.    Implementation To implem...

Azure Functions: Processing CSV file uploaded to Azure BLOB Storage

Image
In this article, we will see how to process the CSV file uploaded to Azure Blob Storage using Azure Functions. The Azure Function is a serverless solution using which we can perform server-side tasks using less code with low infrastructure maintenance. This helps to save the cost and makes us free from worrying about deploying and maintaining servers for running our code on Azure.    Why Azure Functions? The software applications often need to execute some tasks based on events e.g. when an HTTP request is received process data on some complex business rules when the file is uploaded to the Storage compress the file to save the space or process a large volume of the data when it is updated. In all these cases it is recommended that we must execute a background process to perform such complex operations based on triggering events. The Azure Function is exactly used for such background tasks. Please note that to implement the code for this article, the Azure Subscription is requ...

ASP.NET Core 6: Using Role Based Security for ASP.NET Core 6 WEB API

Image
In this article, we will see the complete implementation of the Role-Based Security for ASP.NET Core 6 WEB API. While building the FullStack application, we need to make sure that the Front-End application e.g. Angular, React.js. VueJS, Blazor, should access the WEB API securely by using a well-defined Authentication and Authorization mechanism. I have already published articles on ASP.NET Core WEB API Token-Based authentication on the following links ASP.NET Core 5 and Blazor Web Assembly Apps: Token Based Authentication in ASP.NET Core 5 APIs and Authenticating it using Blazor WebAssembly Apps (webnethelper.com) Understanding Token Based Authentication in ASP.NET Core 3.1 using JSON WEB TOKENS (webnethelper.com) Authenticating Angular 8 Client Application with JSON WEB Token (JWT) Based Authentication (webnethelper.com) In ASP.NET Core, the Policy-Based Authentication allows to club roles into a group and we can set the access policies of the API methods to these groups. We can provi...