Icon used in this post is property of FusionCache repo. In today’s event-driven programming world, we are using lots of Azure Function as the serverless solution that allows us to write less code, maintain less infrastructure, and save on costs. Azure Function comes with various triggers such as HttpTrigger, ServiceBusTrigger, SqlTrigger etc. which help us build an API easily. Let’s say the team already built a HttpTrigger API GetProductsById and the data is coming from Azure SQL.

Continue reading

Hi Everyone! This is continuation of the series of posts on Polly v8 and .NET 8. In this series of posts, I will try to cover some of the new features of Polly v8 and .NET 8. Below are the topics I am planning to cover in this series : Implementing Retry Strategy for HttpClientFactory using Polly(v8) and .NET 8 This Post - Re-Authorize Efficiently Using Polly And .NET HttpClientFactory in .

Continue reading

Hi Everyone! As you are aware I have decided to move away from MOQ and insted we will use FakeItEasy for mocking the Azure Storage SDK. This post is adoptation of this which is using Moq. You can find the full series of how to perform unit and integration tests for Azure Blob Storage using Azurite Test Containers, and xUnit. Getting started with testing for Azure Blob Storage : Dependency Injection

Continue reading

Hi Everyone! In this post, we will discuss about the alternative framework for mocking. This post is adoptation of this which is using Moq. You can find the full series of how to perform unit and integration tests for Azure Blob Storage using Azurite Test Containers, and xUnit. Getting started with testing for Azure Blob Storage : Dependency Injection Getting started with testing for Azure Blob Storage : Unit Test with help of Moq

Continue reading

We, as C# developers, are used to throwing exceptions everywhere be it a functional such as validation or technical such as network failure. But is it worth throwing exceptions everywhere? Exceptions are expensive. You should not throw exceptions everywhere. You should throw exceptions only when it is necessary. But how? Let’s discuss the alternative approach. Types of exceptions in general Excellent article by Eric Lippert on exceptions, where you can find the types of exceptions in general.

Continue reading

Recently, Polly team did fabulous job 🎉 by releasing the new version 8.0.0. It has lot of improvements and also they re-implemented Policy as Strategy. Polly v8 introduces the concept of resilience pipelines, a powerful tool that put together one or more resilience strategies.Here is the all changes you can find. The Problem Microsoft provides a extension Microsoft.Extensions.Http.Polly which allows us to use Polly with HttpClientFactory. It is very easy to use and you can find the documentation here.

Continue reading

Author's picture

Ankit Sarkar | .NET Enthusiast | Azure Cloud Practitioner

Technical Architect, Microsoft Certified Azure Solutions Architect Expert

Technical Architect

Leeds
#TalkWithMe