If you need to immediately know if the other end of your WebSocket has unexpectedly disconnected, this is a solution.
A simple but effective way of checking if the other end of a TcpClient socket has disconnected.
Enterprise companies often have strict firewall rules that can block Blazor WASM apps from downloading their required DLLs.
Here is a simple fix!
When you build an app with a .razor component in it, the compiler will auto-generate code to build the render tree. If you want to see the generated code you can edit your .csproj file and add the following to your <PropertyGroup> node. After you build your application, look in the obj folder that is …
Continue reading Viewing Blazor auto-generated code
If you need a validation attribute on your input object that simply requires the user to tick a box to confirm something, you can use the following The class is then consumed like so This will work with any app that uses Data Annotations as a form of validation, such as ASP.NET MVC apps or …
Continue reading Click to confirm
Entity Framework Core introduces various extensions to IQueryable to allow asynchronous operations.
It can be difficult to mock dependencies that use those extensions when writing tests.
This is how it’s done…
After many decades of writing his famous song The Elements, I’ve inspired Tom Lehrer to add the newly discovered elements!
If you are seeing frequent deadlocks when inserting rows into a SQL Server table, here is the solution…
This article explains how you can generate GUID formatted values that are unique across processes and will also be appended to the end of SQL Server indexes.
Sometimes you need your component to have its own unique (isolated) dependency injection container, where all the injected services are disposed with the component.
This article explains how that can be done.