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…
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.
If you are familiar with setTimeout in JavaScript, here is how you do something similar in Blazor.
I was really pleased to see my Blazor library “Fluxor” mentioned in this Visual Studio Magazine article!!!
If you have an Observable<x> in your component you might find yourself doing something like this {{ ( source$ | async)?.property1 }}{{ ( source$ | async)?.property2 }} This will subscribe to the source$ observable more than once. A commonly used technique to avoid this is to assign the result of the async into a view …
Continue reading Assigning a piped async result to a variable in an Angular view
Here is a simple routine that implements what is known as the Elvis Operator in TypeScript. In C# you can write code like thisNullable<int> age = person?.BestFriend?.Mother?.CurrentHusband?.Age); If any of the values along the way it will return a null rather than throwing a NullReferenceException. Using the class in my previous blog Get a Lambda expression …
Continue reading Implementing a really simple Elvis Operator in TypeScript
If, like myself, you prefer as many of your coding mistakes to be identified at compile time as possible then you might like the following example. The FormBuilder in Angular expects us to identify our FormControls with a string name. If ever the API of your server changes then of course the names of those …
Continue reading A type safe way of creating Angular ReactiveForms and FormGroups