Programming
SHA256 in SQL
In SQL you can use the HASHBYTES function to generate the hash of an input, the output is the binary represention of the hash. If you want to get this as a unicode value then you can use the below Read more…
In SQL you can use the HASHBYTES function to generate the hash of an input, the output is the binary represention of the hash. If you want to get this as a unicode value then you can use the below Read more…
Usually when I build a website it’s an ASP.NET Core Razor site created from Visual Studio but I’ve recently started to try to get to grips with the React framework (again within Visual Studio). This means I’m having to relearn Read more…
Extension methods for adding a BlobServiceClient are provided by Microsoft as previously mentioned, however there’s no equivlent for adding access for Table (or Cosmos DB) storage. The below extension allows CloudTable and CloudTableClients to be injected. Though as Table storage 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…