Blazor

What is Blazor and why is it so exciting?

I'm just going to say it right from the start, .NET running in the browser. No plugins, no add-ons, no weird transpilation voodoo. THIS IS NOT Silverlight. Just .NET running in the browser.If you're a .NET developer who's even remotely interested in web development I should firmly have your attentio…

5 min read
Unit Testing

Unit Testing ILogger in ASP.NET Core

I've been creating a new template solution for our ASP.NET Core projects. As I was writing some tests for an API controller, I hit a problem with mocking the ILogger<T> interface. So I thought I would write a quick blog post about what I found, mainly so I won't forget in the future!I had a se…

4 min read
TDD

Test Driven Development: In Practice

This is part two of a series:What is Test Driven DevelopmentTest Driven Development: In PracticePreviously I talked about the basics of Test Driven Development or TDD, as well as some of the rules around the practice. While it's important to get the theory, lets face facts, it can be a little dry. S…

12 min read
Unit Testing

Unit Testing with the HttpClient

There has been a lot of discussion about how and even if the HttpClient class is testable. And it very much is.So I wanted to write a quick post giving you three options that you can use when you need to write tests involving the HttpClient.Let's assume we have a simple class which gets a list of so…

3 min read
TDD

What is Test Driven Development

This is part one of a series:What is Test Driven DevelopmentTest Driven Development: In PracticeAt the start my career I had a bit of a love-hate relationship with unit testing. Several times I'd swing from "they are totally indispensable" to "well, I'll do them if I get time".As I've matured in my…

6 min read
Docker

Dockerising an ASP.NET Core application

Docker is a technology which allows applications to be packaged up and run in containers. In this post we will go through how to achieve this with an ASP.NET Core application.All code from this post is available on my GitHub account.Step 1 - Getting SetupI am going to be doing this from a Mac. But y…

3 min read
ASP.NET Core

ASP.Net to ASP.Net Core 2 - 5 things to know

When I first heard about ASP.NET Core I couldn't wait to try it. But for me, v1 and v1.1 just didn't have enough APIs.Welcome ASP.NET Core 2!The ASP.NET Core 1 framework had around 14-16 thousand APIs available. With ASP.NET Core 2 that number is now in the region of 36 thousand.With that I have sta…

4 min read
NGINX

How I Dockerised my blog

Docker is a fantastic tool and great if you're running a VPS like me. However a common question is... What if I want to be able to run multiple sites from a single VPS?Most websites running in containers listen on port 80 by default. Only one of them can be bound to that port at a time, so whats the…

5 min read
ASP.NET Core

Creating an ASP.NET Core app on a Mac

Coming from a Windows background I took the plunge recently and swapped to a Mac. This has given me the perfect opportunity to get into .NET Core! In this post I'm going to take you through getting everything you need to get setup and create your first app.PrerequisitesLets just go over a few things…

3 min read
NGINX

HTTPS with Nginx and Let's Encrypt

I've been wanting to get started on this blog for a while now but I wasn't sure what to kick things off with. Then I realised that setting this blog up has been pretty interesting. So why not start with a post about that...The ProblemWhen I setup this blog I had an issue with not being able to redir…

3 min read