Monthly Archives: September 2022

Allowing an empty JSON body, or no Content-Type, in a C# ASP.NET Core API

NOTE: In applications targeting net7.0+, Microsoft has fixed this issue, and you can set your Object to be default null (MyClass thingamagic= null), having it work as expected.Leaving the below hack in here for anyone stuck on net6 or below. — You may be here because you’re getting this: {“type”:”https://tools.ietf.org/html/rfc7231#section-6.5.13″,”title”:”Unsupported Media Type”,”status”:415,”traceId”:”00-0d785f3d1cb4fd71bc36ee25561e4b48-6bc5df1f0d070024-00″} Or this: {“type”:”https://tools.ietf.org/html/rfc7231#section-6.5.1″,”title”:”One […]

Moving columns in PowerQuery without naming every column

If you have pivoted data, you probably don’t want to name all the columns to move one, as a lot of them are going to contain dynamic data. The solution is to use the list of columns, manually moving the one you want into the desired position, as such: = Table.ReorderColumns(PreviousStepName, List.InsertRange(List.RemoveItems(Table.ColumnNames(PreviousStepName), {“ColumnToMove”}), 4, {“ColumnToMove”})) […]