Extension methods for dumping a C# DataTable to a CSV file or string. For DataReader to CSV, this worked for me:https://stackoverflow.com/a/29561684/8534588 …
C#: Track Performance of Database Calls
Plug-n-play thread-safe C# utility class for determining which database calls are slowing down your application. Examples: …
[Read more...] about C#: Track Performance of Database Calls
Simple C# Cache
A plug-n-play thread-safe cache that can be dropped into any C# application. Notes: The active parameter exists for easy disabling of the cacheIf you are caching objects (i.e. T is a reference type) you should supply a clone function that is more efficient than the default …
Singleton Pattern Implementations
A brief reference on ways to implement the singleton pattern. Static Class Use a static class for your singleton only in the most basic of applications. Here is an example of using a static class for a threadsafe collection of objects that you want to access from anywhere in your …
SignalR Quickstart
How to set up SignalR in your ASP.NET Core 3.1 project. Install the Microsoft.AspNetCore.SignalR NuGet package: Create a Hubs folder in your project, and create MySignalRHub.cs inside of it: Update MySignalRHub.cs like so: Use dependency injection to access your DbContext (or …