Peter Peter
  • Log in

Copyright © 2025

Powered by BlogEngine.NET

Designed by Francis Bio

Faking DbContext in Tests with NSubstitute

13 October 2023 Peter-Himschoot

You want to test something that uses an Entity Framework DbContext as a dependency.

Can I replace this easily with a fake DbContext using NSubsitute?

[More]

Using System.Text.Json Source Generator to Improve Performance

26 April 2023 Peter-Himschoot .NET Core, .NET Development

This blog post shows how you can improve JSON serialization performance with a simple step, thanks to the Roslyn Source Generator feature.

[More]

Faking DbContext in Tests with MOQ

14 February 2023 Peter-Himschoot

You want to test something that uses an Entity Framework DbContext as a dependency.

Can I replace this easily with a fake DbContext?

[More]

ChatGPTs Singleton Implementation

13 February 2023 Peter-Himschoot

How good is ChatGPT at writing code?

[More]

Prefer ValueTask<T> for Interfaces

30 January 2023 Peter-Himschoot
Task vs ValueTask

Prefer ValueTask for Interfaces

[More]

Debugging JWT tokens in .NET 6

04 September 2022 Peter-Himschoot
Debugging

How do you debug your JWT bearer token in .NET 6?

[More]

.NET 7 Code Generated Regular Expressions

22 March 2022 Peter-Himschoot .NET Core, .NET Development, Blazor
Regex

With the new .NET 7 we see increased code generation being used for efficiency. In this blog I want to discuss the added support for regular expressions.

[More]

Implementing Decision Tables with C# pattern matching

26 January 2022 Peter-Himschoot .NET Core

Decision tables

Complex business logic can be simplified by implementing this as a decision table using C# pattern matching.

[More]

C# 10 Implicit Using and File-Scoped Namespaces

10 October 2021 Peter-Himschoot .NET Core, .NET Development

With .NET 6 comes C# 10, and this has a couple of interesting language features. Here I want to disc

[More]

C# Nullable Reference Types

07 October 2021 Peter-Himschoot .NET Core, .NET Development

Using Nullable Reference Types

Introduction

One of the major sources of unexpected runtime er

[More]

<< Older posts Newer posts >>
  • Newer posts
  • 1
  • 2
  • 3
  • 4
  • Older posts