Archive
Showing posts from 2019.

MailTrap has achieved precognition
We use the rather excellent mailTrap for testing code that sends emails. Whilst this site is very well done, I didn't realise quite how clever the developers were until I noticed this...

Retrying a failed operation
One of our main applications involves interacting with a third-party API. Whilst this is generally stable, we have had cases recently where it was throwing random exceptions. We could make the same request with the same parameters multiple times, and sometimes it would work, and sometimes it wouldn't.
While we left the owners of the third-party API scratching their heads, we realised that the way we handled interaction with such APIs wasn't robust enough. The first (and most obvious) improvement would simply be to try again.
As this is the sort of thing we'd want to do in a number of places, rather than repeat the same boilerplate code over and over again, we looked for a helper class.

Adding a non-nullable foreign key reference
Being fairly new with EF Core, I am still discovering solutions to problems that I solved long ago with database-first development.
Today I found out how to add a non-nullable foreign key reference to a new table.

Setting a design-time data context in XAML so that Intellisense works
A quick tip showing how to tell the XAML designer the context for sections of code that are not under the current DataContext. This helps keep your XAML error-free, and gives you Intellisense where you otherwise wouldn't get it.