“Code Tips” or “Programming” (both aliases for this term in my site’s taxonomy) is my category for whatever posts I’m able to come up with, that handle programming, code quality and/or handy workarounds. Is code directly involved? Then the post should be filed under here!
This is meant to distinguish posts from different things, like configuration or user analytics -related posts. Even tips of fixing Azure DevOps pipelines go elsewhere, because that’s not programming.
Another case, where there’s plenty of documentation, but it just doesn’t seem to be comprehensive enough or just doesn’t apply for any of the cases that I have – for whatever reason. Maybe my cases are wrong, or I’m just bad at googling, but I’ve struggled to find a good…Continue reading Iterating Group memberships using Claims in .NET Core
When you’re in your .NET Core project, it’s always easy: you just register your DbContext in ConfigureServices, and then inject it into whichever Page, View or Controller you might need it in. However, when you have another project or solution you’re working on and you’d still like to use the…Continue reading How to create a DbContext from just a connection string?
I ran into another interesting one when working with a .NET Core 3.0 project and Entity Framework Core – this time, RuntimeIdentifier configuration causing trouble. In short, running Update-Database (to apply code-first migrations to your local database) locally would return this, annoying error: I suspect this can happen with any…Continue reading EF Core fails to load hostpolicy.dll when RuntimeIdentifier is win-x86
Just a quick piece of documentation, as this piece of code, has changed in different versions of .NET Core 3.0 so far a few times. Need to have things like this written down somewhere! UriHelper / NavigationManager with .NET Core 3.0 Both of these helper libraries do essentially the same…Continue reading How to use UriHelper or NavigationManager in .NET Core 3.0 & Blazor?
Blazor is a new (ish) framework for building web UIs with C#. It either uses SignalR to manage connections between your client-side and server-side code or even compiles directly to WebAssembly, in both cases cutting out the need to write any pesky JavaScript yourself – pretty neat, if you ask…Continue reading HttpClient in Blazor
This post describes the easiest way to show description texts for properties in ASP.NET MVC 5. Sounds simple, right? We can use something like @Html.DescriptionFor(x => x.Property), right? Alas, it’s not that straightforward. A bit surprisingly, there’s no ready-made helper function for this. I’m saying “surprisingly”, because I feel like…Continue reading How to get the Description for a property in ASP.NET MVC 5?
Welp – just ran into this one, and as I expect others to encounter the same issue, I’d better document it right away! So in Blazor, I was crafting a simple component that’d display some data in a nice way. Being lazy and crafty, I thought I’d copy-paste some similar…Continue reading ‘__generated__Index.OnInitAsync()’: no suitable method found to override
Whilst building a proof-of-concept on .NET Core 3.0 preview 7 I ran into issues when developing web APIs. This release is production-ready (according to Microsoft -see below), but every now and then you run into really unintuitive and sometimes surprising issues. Go LiveNET Core 3.0 Preview 7 is supported by…Continue reading How to resolve build failing with .NET Core 3 and Microsoft.AspNetCore.Mvc.Versioning