Problem Details + Error Handling + .NET Core 3

Goals for this experiment: HTTP calls that route to /api/… (the API) should return errors in the Problem Details JSON format. We should be able to map specific exceptions to specific HTTP status codes, and control the data returned. When in developer mode, errors include full exception details When not in developer mode, exception details […]

A C# nullable reference types policy

At work, we’re full steam ahead with .NET Core 3 and, thusly, nullable reference types. And we’ve come to realize that we need some kind of policy to dictate how nullable reference types will affect our code. It’s not just a matter of turning the feature on — you have to make careful decisions about […]

Entity Framework Core Navigation Property vs Foreign Key Property — FIGHT!

9/30/2019 4:27:40 PM UPDATE: Apparently, things changed since .NET Core 3 Preview 5 which is when I wrote this post. I’ll update the post as soon as I make sense of all my unit tests that are failing since updating to .NET Core 3 RTM. Suppose we have an entity A that has a direct, […]

Publishing a Visual Studio extension via command line

Microsoft not so recently added support for publishing Visual Studio extensions to the marketplace via a command line interface called vsixpublisher.  It’s no coincidence they tweeted me upon releasing the feature, as I’d been pestering them for a very long time to make it happen. The walk-through I linked to will get you going, but […]

What is ASP.NET Core 2.1 API “Problem Details” (RFC 7807)

When ASP.NET Core 2.1 came out, there’s was a relatively brief announcement about new support for “Problem Details” (RFC 7807).  In this release we added support for RFC 7808 – Problem Details for HTTP APIs as a standardized format for returning machine readable error responses from HTTP APIs. If you just want a better explanation of problem […]

Scroll Up