Simple Conditional Updates to Entities in ASP.NET Core MVC

When you accept a view model in your .NET Core MVC application, you can request that only certain fields are bound, like this [Bind(“Title”)]. Neat. But when you want to apply the changes to your domain object, you often want to do a similar thing and only update certain fields (and only if they reallyContinue reading “Simple Conditional Updates to Entities in ASP.NET Core MVC”

Switch Off Rich Link Pasting in Edge

There is a cool new feature in Microsoft Edge that pastes links with rich formatting. If you copy a link from the page or from the address bar, it will paste in a rich format, so instead of seeing https://www.example.com/ you’ll see Example Website (example.com) and it will already be linked to your selected destination.Continue reading “Switch Off Rich Link Pasting in Edge”

Working With Public Coronavirus Data

The UK Government provides public datasets that can be used by the media or the public. One such dataset contains information collected for the Coronavirus pandemic and its impact on people living and working in the UK. The problem with this dataset, though, is that we weren’t able to record the data until after theContinue reading “Working With Public Coronavirus Data”

Use PowerShell to Send All Regex Matches to a New File

Yesterday I had to look at a list of stuff on a third-party website and match it up to a list of stuff we control. It took quite a bit of time and some Excel shenanigans to complete the task and as I know it’s going to crop up again, I decided to employ PowerShellContinue reading “Use PowerShell to Send All Regex Matches to a New File”

The type or namespace name ‘ApplicationInsights’ does not exist in the namespace ‘Microsoft’

If you uninstall the Application Insights package from a .NET Core MVC project, you might get a few errors as it can’t “remove all the references” that might have made it into your application. The changes to StartUp.cs will be pretty self-explantory, but elsewhere you will get something a bit more off-the-wall as it referencesContinue reading “The type or namespace name ‘ApplicationInsights’ does not exist in the namespace ‘Microsoft’”