How To
Thread Lock in C#
1/9/2025 4:28:59 AM 47
In this article, we will explore the concept of thread locking in C# and how locks ensure exclusive access to shared resources.
Connecting to Multiple Databases in C# using DataContext
1/9/2025 4:22:57 AM 132
As your application grows, you might find the need to connect to two or more databases.
Injecting ILogger into Dapper Polly Retry Policy in C#
1/9/2025 4:06:19 AM 69
There are many articles available on how to implement a retry policy when using Dapper, and I particularly like the extension method approach.
Using SqlBulkCopy to Insert a List of Objects in C#
1/9/2025 4:00:59 AM 107
The SqlBulkCopy class in C# offers an efficient way to insert large volumes of data into a SQL Server database.
Marking Deprecated Code as Obsolete in C#
1/9/2025 3:48:47 AM 82
If certain code is no longer needed, outdated, or no longer maintained, you can mark it as obsolete.
How to Add User-Agent to Application Insights Telemetry in C# Using Middleware
1/9/2025 3:44:14 AM 100
To achieve this, we’ll implement a custom middleware.
How to Sort a List of Dynamic Objects in C#
1/9/2025 3:32:15 AM 31
The dynamic type in C# allows you to work with objects without specifying their exact type ahead of time.
Sorting JArray in C# with Newtonsoft.Json
1/9/2025 3:29:46 AM 37
Although you can't directly sort a JArray in C#, you can work around this limitation.
Lowercase JSON Attributes in C# API Responses
1/9/2025 3:23:52 AM 60
When developing an API in C#, you can customize how the JSON response is formatted.
Batch JSON Arrays with LINQ Chunk Method
1/9/2025 3:18:48 AM 31
By utilizing the LINQ Chunk method, you can transform a one-dimensional array into a two-dimensional array (batches).
HttpClient Retry with .NET Core, Polly, and IHttpClientFactory
1/9/2025 3:15:23 AM 120
Many HTTP errors are temporary and caused by issues such as server overload, network timeouts, or transient glitches.
Implementing HTTP Timeout Retries with Polly and IHttpClientBuilder
1/9/2025 3:10:38 AM 71
Polly's retry functionality combined with IHttpClientBuilder provides an elegant solution to configure retry logic at the application startup.