Inspecting Data in SQL Tables
When importing a flat file provided by a client into a SQL table the data in the file is often a bit of a mess and it can be easier to import all the columns as long strings into a Read more…
When importing a flat file provided by a client into a SQL table the data in the file is often a bit of a mess and it can be easier to import all the columns as long strings into a Read more…
I’m currently using RestSharp as a client for downloading product details, however it appears that the response from the server (which I have no control over) is encoded in a differerent character set (ISO-8859-1) than RestSharp is expecting (UTF-8). This Read more…
I’ve been needing to access the AWS S3 API recently as part of a project and although there’s a pretty good client already available it didn’t quite meet my needs so I decided I needed to build my own client Read more…
If you’re using Azure Table Storage then it’s often more efficent to perform operations such as insert, update, delete in batches rather than making seperate calls for each individual row. There can be up to 100 entities in each batch Read more…
Mostly just a link to this article containing best practices. There’s some useful extension methods available from Microsoft.Extensions.Azure to make for easier dependency injection of the various Azure services. There’s also some good examples available here.
If you’re using Serilog for logging in an application but it doesn’t seem to be logging anything then it’s possible to use the SelfLog functionality to have it report it’s own errors to help with debugging. The easiest way is Read more…
If you are returning a JSON representation of an object from an MVC controller it may be necessary to determine how the JSON is formatted. This can be done using the JsonSerializerSettings object like so. This used to work as Read more…
If you have 2 (or more) lists in C# and you want to check if they have 1 or more values in common then you can use the following LINQ to check.
If you have 2 dictionaries of the same datatype in C# which you want to merge together then you can use the following code. If a key exists in both of the dictionaries then the primary value will overwite the Read more…
If you have a complex table structure in SQL that you want to map into corresponding classes in your .NET Core project it might be easier to output the result of your SQL query as JSON and then deserialize the Read more…