.NET enthusiast 🚀 | Visit my website for .NET tutorials, code examples, and coding challenges 💻 | Teaching .NET through my YouTube channel 🎥

Worthing, United Kingdom
Joined April 2013
You can call EnsureSuccessStatusCode in a HttpResponseMessage type when making an API call in your .NET project. With this line, if an unsuccessful status code is returned from the HTTP response, it will throw an exception.
1
1
225
Learn about adding SignalR to your ASP .NET Core project so you can add real-time communication. As well as sending and receiving messages, you'll also learn about how to send messages to different connected clients. Watch my video to find out more. youtube.com/watch?v=Mhgb_D4o…
1
182
You can call multiple asynchronous jobs and await all of them to complete by using Task.WhenAll. Task.WhenAll will only be completed when all tasks specified in its parameters are completed.
1
100
Feature Management in ASP .NET Core allows you to add feature flags. You do it by adding the Microsoft.FeatureManagement.AspNetCore NuGet package and calling AddFeatureManagement extension method.
1
4
119
You can use IConfiguration, IOptions or IOptionsSnapshot to get appsettings configuration values into an ASP .NET Core application. But which one should you use? Watch my video to find out. youtube.com/watch?v=FAV1XtFH…
75
When creating a custom scope in a .NET project, you can now create it asynchronously. The 'await' keyword has to appear before the 'using' statement, and you call the CreateAsyncScope.
1
86
To add the default extensions to wwwroot files in ASP .NET Core, you can add app.UseDefaultFiles() in Program.cs. This will add Default and Index (.htm and .html) as default files for a folder. It must be called before app.UseStaticFiles().
49
If you want to use IHttpClientFactory outside of ASP .NET Core, you can add Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Http to your project. Then build a service collection by adding your HttpClient to it.
46
In SignalR, you can use Clients.All to invoke a method to all connected clients. However, you can invoke a method to the connected client by using Clients.Client(Context.ConnectionId). This is handy if you want to send a message back after they sent one.
2
77
.NET 7 has now reached end-of-life meaning it's time to update! By not doing so risks your application's security. That's because Microsoft will no longer make any more updates to .NET 7 & won't put in fixes for newly found bugs. Watch my video for more: youtube.com/watch?v=Eywsbot3…
56