Conditional Middleware in Isolated Azure Functions
Middleware is an awesome tool, but how do we apply specific steps to specific function triggers?
Posted on 22 February 2023
Deploying an Azure Static Web App with Pulumi as a Beginner
Heard of Pulumi but never played? Written a new Azure Static Web App but unsure on how to deploy it to Azure? A complete beginner to Infrastructure as Code? Let's explore these scenarios together!
Posted on 13 December 2021
Why I love Resharper 3
Learning new language features can be hard. Applying them can be tricky. How does Resharper aid with filescoped namespaces?
Posted on 09 December 2021
Runtime Dependency Resolution Using AutoFac in .NET 6 Isolated Azure Functions
Need to specify a dependency at runtime in an Azure Function? Can it be done?
Posted on 30 November 2021
Using AutoFac Keyed Dependencies Directly in .NET 6 Isolated Azure Functions
Autofac allows for using Named or Keyed dependencies. Can these be used directly in .NET 6 Isolated Azure Functions without additional layers?
Posted on 26 November 2021
Using AutoFac Keyed Dependencies with .NET 6 Isolated Azure Functions
Autofac allows for using Named or Keyed dependencies. Can these be used with .NET 6 Isolated Azure Functions?
Posted on 19 November 2021
Using AutoFac with .NET 6 Isolated Azure Functions
Having the ability to use the Inversion of Control container of choice in your application is important. But can you use AutoFac with Azure Functions? Let's find out!
Posted on 09 November 2021
Using Azure Functions Middleware to Access ClaimsPrincipal in Azure Static Web Apps
Wanted to access the current ClaimsPrincipal from your Azure Function when using Azure Static Web Apps without manually parsing the header every time? Want to access the ClaimsPrincipal somewhere else in your dependency graph without relying on Azure Functions concepts? Now you can!
Posted on 02 November 2021
Is Accessing Querystring Values in Azure Functions Hard?
Accessing querystring values on web requests is an important concept for any modern APIs. But how can it be done in Azure Functions?
Posted on 22 September 2021
Separate the Metadata Noise from the Implementation in Azure Functions
Can lesser known C# language features be used to aid with lower the cognative noise in Azure Function definitions?
Posted on 14 September 2021
Minimal Api in .NET 6 Out Of Process Azure Functions
Can you write a "Minimal Api" using Azure Functions in .NET 6.0? Let's take a look!
Posted on 07 September 2021
When is not null not null but checking not null in .NET 6
With the new .NET version due to drop in November and the advent of C# 10 there are a number of improvements to the language but are they helping or hindering? Let's explore one of the common patterns we see in C# and how the language is changing around this area.
Posted on 31 August 2021
Is Dependency Injection Into a Custom Exception a Good Idea?
Investigating whether dependency injection into a custom Exception class a good idea.
Posted on 24 August 2021
Ambiguous match found in Azure Functions project
Running an Azure Functions project but start getting Ambiguous match found error? Let's take a look at what could be the issue.
Posted on 17 August 2021
Razor Pages Scaffolding Submit with Error 400
Having an issue with submitting scaffolded razor pages on localhost?
Posted on 10 August 2021
Azure Functions CLI Failing After Preview Install
Getting an error on the command line when using the Azure Functions tools to create new C# functions. Let's see how to get around this.
Posted on 03 August 2021
Getting Started with Twitter API using SocialOpinion
Looking to get started with using the Twitter APIs but unsure how to get started? In this post we look at using the SocialOpinion API nuget package to make accessing Twitter from code easier.
Posted on 27 July 2021
Target Typed New Expressions in C# 9 - Are They The Future? Part 2
Recieved some feedback from the previous blog post about Target Typed New Expressions and it made me think.
Posted on 20 July 2021
Target Typed New Expressions in C# 9 - Are They The Future?
Initial thoughts about target typed new expressions in C#9. Are they good? Are they bad? Does "it depend" on the scenario? Let's take a look.
Posted on 13 July 2021
Test Your .NET HttpClient Based Strongly Typed Clients Like a Boss
Looking at using HttpClient Interception library to setup and create a HttpClient instance to allow for testing strongly typed client classes.
Posted on 29 June 2021
Default Your FirstOrDefault in .NET 6.0
New overrides coming for commonly used linq extension methods, will you be using them?
Posted on 22 June 2021
Setting Content for HttpClient Testing with JSON.NET and System.Text.Json
Setting up matches with HttpClient Interception library is one thing, but configuring the data it can return is another. In this post we take a look at the functionality around setting up the content payload to return.
Posted on 14 June 2021
Extending HttpClient Testing With Templating
Continuing the series of HttpClient Interception library by Just Eat by looking at how to use templating to reuse the same bundle definitions across multiple tests.
Posted on 08 June 2021
Quick Tip - Compiler Directives and Using Aliases to Ignore Tests
Ever needed to run a test when in debug mode but not in release? Let's show a quick tip on how to achieve this with minimal noise in your code.
Posted on 01 June 2021
Simple Example of Calling REST API with HttpClient in .NET 5.0
Beginner friendly usage of a HttpClient in a console application to make a simple request but using dependency injection to create HttpClient instances.
Posted on 25 May 2021
Defining HttpClient Test Requests by Using a Bundle
Taking a look at how we can easily define multiple request templates when testing with the HttpClient Interception library from Just Eat Tech.
Posted on 18 May 2021
Catching all the Requests while Testing with HttpClient
Making sure tests fail if not all request matches are defined using the HttpClient Interception library from Just Eat Tech.
Posted on 11 May 2021
Beginning to Make Testing with HttpClient Easier
Introduction to the basics of setting up the HttpClient Interception library from Just Eat Tech to allow for testing items which rely on HttpClient.
Posted on 04 May 2021
Lightning Talk on HttpClient Interception by Just Eat at .NET Oxford Apr 2021
Second Lightning talk presented to .NET Oxford on evening of the 21st April 2021. The talk was a very high level overview of the Just East HttpClient Interception library.
Posted on 27 April 2021
Easily Create and Manipulate Mock Anonymous Data for Unit Tests
Looking to easily create mock data for unit testing, harnessing the power of AutoFixture, C#9 Records and the Builder Pattern to aid with consistency and maintainability.
Posted on 20 April 2021
Removing IOptions From Your Strongly Typed Configuration in Azure Functions
Want to strongly type your configuration but don't like IOptions? Let's take a look how to do this in Azure Functions.
Posted on 13 April 2021
Azure Functions Not Loading My Dependencies, What Have I Missed?
My dependencies and configuration weren't being loaded into my new Azure Function application, what did I miss?
Posted on 06 April 2021
Why won't you load my configuration Azure Functions?
Loading configuration from local.settings.json didn't work how I was expecting it to so had to extend the start up to load structured configuration from appsettings.json
Posted on 30 March 2021
Harness Azure CLI to Keep Your App Service Name
In this post we walk through the steps I used to delete and recreate an Azure App Service under a different App Service Plan using the Azure CLI so that I could keep the *.azurewebsites.net name for consistency.
Posted on 23 March 2021
Generating Date of Birth values for .NET5.0 Record types using AutoFixture
Ever needed to generate realistic date of birth values for your anoymous unit test data? Sick of setting the value manually and seeing your own date of birth propagate through codebases as developers copy 'n' paste your example? Time to get AutoFixture to do the heavy lifting!
Posted on 09 March 2021
Default .NET 5.0 WeatherForecastController as an Azure Function
Looking into what it would take to implement the default aspnet web api template WeatherForecastController as an Azure Function.
Posted on 23 February 2021
Controlling The Logging Levels in Azure Functions
Looking into controlling the logging levels in Azure Functions.
Posted on 16 February 2021
Create Anonymous Data Object With AutoFixture From Type
Creating anonymous data using AutoFixture's generic methods is great, but can you do it from a type?
Posted on 02 February 2021
Arrange, Act, Assert - Why I Still Comment Unit Tests
Using the Arrange, Act, Assert setup in unit tests, why do I still add the comments? Read on to find out.
Posted on 26 January 2021
AutoFixture and .NET 5.0 Record Types
Does AutoFixture and the new .NET 5 Record Types work together?
Posted on 19 January 2021
Debugging Dependency Injection Service Registrations in .NET 5.0
Investigating a technique on how to debug service registrations when functionality isn't working as expected.
Posted on 12 January 2021
Top Level Statements and Dependency Injection in .NET 5.0
Exploring Top Level statements in .NET 5 and manually setting up and using dependency injection with the Microsoft container.
Posted on 05 January 2021
Lightning Talk on AutoFixture at dotNetOxford Nov 2020
First public speaking engagement, thoughts on how it went and link to video
Posted on 24 November 2020
Integration Testing with ASP.NET Core 3.1 - Set Default Headers for All Clients
Set up a custom WebApplicationFactory to always add specific headers to the generated HttpClient
Posted on 20 October 2020
Using Project Tye to Run .NET Worker Services
Looking at another .NET templated project type working with Project Tye. In this post we explore the .NET Worker Service template type.
Posted on 15 September 2020
Using Project Tye to Run Dependent Services for use with ASP.NET Core
Needed to spin up a dependency such as Redis locally but it's too involved using Docker or the alternatives aren't good enough? Let's explore how to harness the power of Docker but keeping the friction low.
Posted on 08 September 2020
Using Dotnet CLI To Setup ASP.NET CORE Solution And Run With Tye
Setting up a new solution purely on the command line and getting them to run with Project Tye
Posted on 01 September 2020
Nullable Maths Readability
Looking at the readability of performing a mathematical operation on a nullable integer and how it relates to readability and maintainability of the code base.
Posted on 25 August 2020
Autofixture Generate Specific Format Values By Extending AutoDataAttribute
Using custom specimen builders with AutoDataAttribute functionality to reduce the amount of repeated code in your Arrange phase of unit tests.
Posted on 18 August 2020
AutoFixture Generate Specific Format with Specimen Builders
Writing a custom specimen builder to extend AutoFixture's auto generation routines to abide by business requirements.
Posted on 11 August 2020
Returning Different Values From A Method Call
Ever needed to return different values from a method call without exposing an enumerator? Let's explore some options.
Posted on 28 July 2020
Why I love Resharper 2
Looking at another constructor parameter checking option when passing in an enum value.
Posted on 21 July 2020
Optional Dependencies with Autofac
Ever wanted to define a dependency as optional and only be loaded depending on consumption of your service?
Posted on 30 June 2020
Using Moq Callback to set values to drive tests
How to set a value on an object passed to a mock to drive conditional logic further in the system under test
Posted on 23 June 2020
Refactoring and Learning Challange
Taking up the challenge from a tweet I explain my thought process on improving some code which will hopefully help someone.
Posted on 23 June 2020
How To Assert Collection Count With FluentAssertions
Asserting numbers of items in a list or collection is vital to unit tests, but which to choose?
Posted on 16 June 2020
Getting Microsoft Feature Management Working in a Console App
Looking a the new version of Microsoft's Feature Management nuget package and how to get it working in a console application without Azure!
Posted on 19 May 2020
C#8 Using Declarations With FluentAssertions
Harnessing the power of the C# 8 using declarations to aid with unit test assert clarity
Posted on 05 May 2020
Inject JsonSerializerOptions so Don't Repeat Yourself
How many times do you create a private options variable when using json serializer and end up with duplicate code? Let's take a look at one option to help resolve this.
Posted on 31 March 2020
Mocking ILogger with Moq
Looking at how to verify calls to Ilogger based extension methods using Moq.
Posted on 06 February 2020
Integration Testing with ASP.NET Core 3.1 - Swapping a Dependency with Moq
Investigating how to write integration tests while swapping out dependencies with mocked instances using Moq
Posted on 23 December 2019
Reduce Method Parameter Checking
How to make you method parameter checks not take up a chunk of the method body
Posted on 18 December 2019
Integration Testing with ASP.NET Core 3.1 - Remove the Boiler Plate
Writing integration tests for your application while keeping your tests as DRY as possible by removing the boiler plate code
Posted on 16 December 2019
Integration Testing with ASP.NET Core 3.1 - Swapping a Dependency
Looking at how you can write integration tests for your application but swapping out a 3rd party dependency
Posted on 11 December 2019
Integration Testing with ASP.NET Core 3.1 - Testing Your Application
How to write an integration test to access your REST end point api with ASP.NET Core 3.1
Posted on 09 December 2019
Integration Testing with ASP.NET Core 3.1
How to write a basic integration test with ASP.NET Core 3.1
Posted on 05 December 2019
TryParse is your friend
Using the power of the framework to avoid reinventing the wheel
Posted on 06 November 2019
Multiple Ways to Register Your Dependencies with ASP.NET Core 3
Exploring the multiple ways you can register your service dependencies with the new IHost found in ASP.NET Core 3 (Preview).
Posted on 17 June 2019
Registering Services with DotNet Worker Project
How to register services and dependencies in the new dotnet core worker project
Posted on 15 June 2019
Beyond Basics - ASP.Net Core Using the Decorator Pattern
Refactoring to use the Decorator Design Pattern to help apply the Single Responsibility Principle.
Posted on 10 June 2019
Beyond Basics - ASP.Net Core Adding and Using Configuration
Adding strongly typed configuration settings and injected them through dependency injection.
Posted on 06 June 2019
Beyond Basics - ASP.Net Core Adding Caching
Starting the journey of going past the basics of beginner training resources to appy software development practices and design patterns.
Posted on 04 June 2019
Unit Testing - Are you asserting too much?
Are you asserting too much in your unit tests? Is this due to potential code smells? Let's discuss.
Posted on 21 May 2019
Resource Driven Messages in ASP.NET Core
Ever wanted to allow native country error messages from your ASP.NET Core api?
Posted on 03 December 2018
First Published Article
My first published article in DotNetCurry Nov-Dec 2018.
Posted on 21 November 2018
Playing with C# 7 - Deconstruct
Looking at how newer language features allow for extension of types to add Deconstruct functionality.
Posted on 23 October 2018
ASP.Net Core default route on startup
Started a new ASP.Net Core API application and want to default to a different route? Read on to find out how.
Posted on 18 October 2018
Where Should I Put My Logic?
Do you have logic in your constructors as well as duplicated through your class definitions. Explore the options to add consistency into your code.
Posted on 04 October 2018
Span<T> - byte to int conversions - Update
Updating the Span conversion examples with the updated API
Posted on 13 September 2018
Strategy Pattern with Full Generic Contraints
Implementing the strategy pattern with generics to improve consistency of code base.
Posted on 19 July 2018
ASP.NET Core Exploring Custom Middleware
Exploring creating and consuming custom middleware in ASP.NET core and it's configuration
Posted on 10 July 2018
Strategy pattern with enum constraints
Strategy pattern implementation options with enum generic constraints
Posted on 08 June 2018
ASP.NET Core and the Strategy Pattern Continued
Building on the previous post about implementing the strategy pattern in ASP.NET Core to harness SOLID design.
Posted on 06 June 2018
Accessing FitbitAPI in dotnet core and Refit
Using the Refit Rest client library to access the Fitbit Web Api
Posted on 12 May 2018
Fitbit.NET ASP.NET Core Webhook Preview Released
Fitbit Subscription Webhook based on the new ASP.Net Core Webhooks library
Posted on 01 May 2018
ASP.NET Core WebHooks - Mini Series
Links for the ASP.NET Core WebHooks mini series
Posted on 07 April 2018
ASP.NET Core and the Strategy Pattern
Using ASP.NET Core Dependency Injection to wire up a strategy pattern implementation to harness SOLID design.
Posted on 03 April 2018
ASP.NET Core WebHooks - Running The Github Webhook Locally
Running the aspnetcore Github webhook locally.
Posted on 17 March 2018
Mocking the Clock
Reducing the coupling of code dependent on DateTimeOffset
Posted on 15 March 2018
ASP.NET Core WebHooks - Secret Values
Looking at the secret values and how they work to allow for the AzureAlertWebHook webhook to process.
Posted on 16 February 2018
ASP.NET Core WebHooks - Running the AzureAlertWebHook
Running the ASP.NET Core Webhooks project locally and debugging the AzureAlertWebHook end point.
Posted on 13 February 2018
ASP.NET Core WebHooks - Building repository locally
Looking at getting and building the ASP.NET Core Webhooks project on your development machine.
Posted on 11 February 2018
Should I use Nullable bool?
Posted on 30 January 2018
Are you registering IHttpContextAccessor correctly?
Posted on 23 January 2018
Why I love Resharper 1
Posted on 19 January 2018
Missing ClaimsPrincipal in ViewComponents
Posted on 18 January 2018
Refactoring Kata - 6 Year Code Review
Posted on 16 January 2018
When logic doesn't read well it can lead to confusion
Posted on 09 January 2018
Span<T> - byte to int conversions
Posted on 06 January 2018
Asp.net MVC Output Caching During Development
Posted on 13 December 2014
Enums in C#; Doing More Than You Thought!
Posted on 22 July 2014
Make your code readable by making it flow with Generics
Posted on 18 July 2013
Debugging WCF messages before serialization
Posted on 27 September 2012
- Code (103)
- C# (97)
- Thoughts (37)
- aspnetcore (35)
- Remote Working (27)
- Covid-19 (26)
- Azure (18)
- Azure Functions (17)
- Functions (16)
- Unit Testing (16)
- Dependency Injection (11)
- Refactoring (10)
- Design Patterns (10)
- HttpClient (7)
- AutoFixture (7)
- NET 6.0 (6)
- NET 5.0 (6)
- Integration Tests (6)
- Webhooks (6)
- Repost (6)
- Dev Tips (5)
- General (3)
- Resharper (3)
- Moq (3)
- dotnetcore (3)
- Public Speaking (2)
- Project Tye (2)
- FluentAssertions (2)
- Preview (2)
- Fitbit (2)
- NET 7.0 (1)
- Pulumi (1)
- SQL (1)
- Visual Studio (1)
- Razor Pages (1)
- Twitter (1)
- Quick Tip (1)
- Just Eat (1)
- Http Client (1)
- CLI (1)
- App Service (1)
- Azure AD B2C (1)
- ASP.NET 5.0 (1)
- Tip (1)
- Worker Services (1)
- net5 (1)
- Redis (1)
- Tye (1)
- Autofac (1)
- Buy Me a Coffee (1)
- SpaceX (1)
- netcore (1)
- Feature Management (1)
- Back to basics (1)
- Background Services (1)
- Configuration (1)
- Localisation (1)
- HTTP Headers (1)
- Published (1)
- Language Features (1)
- Design Principles (1)
- Top Tip (1)
- Middleware (1)
- NDepend (1)
- Reviews (1)
- Rest (1)
- Refit (1)
- vsts (1)
- aspnetmvc (1)
- Hardware (1)
- Surface (1)
- WCF (1)