Greetings, Programs
Welcome to my blog.
This website is an attempt to write ideas down so I can refer to them later. If someone else finds these ideas useful, then I am glad.
Matthew Edgar
edgamat@outlook.com
https://github.com/edgamat
Latest Posts
Using the new TimeProvider in .NET 8
I have created many custom implementations of a time abstraction to make it easier to test code involving the
DateTime
orDateTimeOffset
structures in C#. With .NET 8, there is now a built-inTimeProvider
for programs to use. Let’s see how it works.Abstracting Infrastructure Concerns
Organizing and creating the architecture for a .NET application can be largely a matter of preference. How many projects should you use? What code belongs in each project? Let’s take a look at infrastructure concerns.
Scripting .NET CLI CI/CD Commands
You submit your code for review and the CI/CD pipeline for your branch fails. I wish I could have known about it before I submitted the PR!
Use JSON Property Names in ASP.NET Validation Error Messages
ASP.NET Web API projects using controllers have a powerful validation mechanism that provides callers with detailed messages when they have sent invalid payloads. One of the problems though, is that the messages don’t use JSON Property Names if the model properties are decorated with
[JsonPropertyName]
attributes. Let’s fix that.ASP.NET Model Binding Quirks
Awhile ago I wrote about using the new JSON library and model binding: Dealing with ASPNET Core 3 API Contract Changes. I only recently started to use it with ASP.NET 8. It has some quicks… let me explain.