Home
Ken Dale
Cancel

SQL ADO.NET Scaler And Reader Sync vs Async Benchmarks Using BenchmarkDotNet, LocalDB, And C#

I wrote some benchmarks using BenchmarkDotNet for ADO.NET C# code targeting LocalDB. Here’s what I found: Results BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042 Intel Core i7-1065G7 CPU 1.30GHz, ...

Monitoring Web Application Deployment Impact Using Artillery

If you’re looking to monitor the state of your web application during a deployment it can be useful to run a bunch of requests to see the impact during deployment. We can use a load testing tool, l...

Dynamic Parameterized SQL Using ADO.NET With C#

Here’s a C# solution for dynamic parameters inside a SQL string: var items = new[] { "a", "b", "c" }; var connection = new SqliteConnection($"Data Source={Filename}"); await connection.OpenAsync()...

Limiting Concurrent Operations With SemaphoreSlim Using C#

If you’re looking to limit the number of concurrent operations but maintain as high throughput as possible SemaphoreSlim can help! For instance, this could help maintain a consistent flow of HTTP r...

Thread Safe Lazy Initialization Using C# Notes

Sometimes it makes sense to lazily initialize something in an application. In the case of an application internal cache waiting until the first access of data to prime the cache could improve start...

Troubleshooting Private NuGet Packages With dotnet CLI

.NET now has a dotnet command line interface (CLI). Commands like dotnet build and dotnet test can be ran directly from the command line. If you’re working with private NuGet packages, that is pac...

Keyboard Shortcuts For Efficient Visual Studio 2019 Testing

When authoring tests using Visual Studio 2019 you may find yourself running tests continually. Whether you’re running tests on a fresh clone to make sure tooling is working or running them while ma...

Using BenchmarkDotNet with Azure Functions

BenchmarkDotNet is a tool for benchmarking .NET applications. Azure Functions is a serverless web application offering. You can put these together to benchmark your Azure Functions applications. S...

Peas&Carrots: The Importance Of Url Encoding Query String Parameters

When creating web applications it’s common to create links. Sometimes, links contain query string parameters. Google uses the ?q= query string parameter for search queries. An issue can arise when ...

Coding To Support Both .NET Full Framework and Modern .NET

Sometimes when writing .NET libraries we want to support .NET Full Framework, as well as modern .NET. In many cases the functionality is the same, but sometimes it is different. For the cases wher...