Microsoft Graph g-raph (giraffe) - the spirit animal of Microsoft Graph

One way to fix “Unsupported or invalid query filter clause specified for property” for your Microsoft Graph API queries

This article explains one possible fix to an annoyingly generic exception thrown by the Microsoft Graph API (namely, “Unsupported or invalid query filter clause specified for property”) or an even more generic exception thrown by PnP PowerShell (“Exception of type ‘PnP.PowerShell.Commands.Model.Graph.GraphException’ was thrown.”) when you’re trying to query Graph API with what’s called “Advanced query capabilities” (operators like less than or equal, greater than or equal) instead of just checking…Continue reading One way to fix “Unsupported or invalid query filter clause specified for property” for your Microsoft Graph API queries

C# & .NET

How to get the EF Core Connection String?

This article describes how to access and extract the connection strings from your Entity Framework (Core) database context objects. This is quite convenient if you need to display or log the connection string used for your current DbContext for some reason – or if you somehow form your DbContext objects dynamically, and need to verify which connection string you’re using. I’m sure there are other use cases, too. You probably…Continue reading How to get the EF Core Connection String?

.NET Core fundamentals in one picture.

How to disable “Register” action in ASP.NET Core?

Sometimes you’ll need the default identity for your ASP.NET Core application, but want to disable the registration of new users. Sounds pretty basic, right? However, there’s actually no easy switch you can just flip to enable or disable said functionality. I went through a lot of different articles and ideas by other people. Most of them involved fiddling with IdentityController, creating new scaffolded pages, adding new Actions with redirection code,…Continue reading How to disable “Register” action in ASP.NET Core?

An accurate depiction of a NuGet package factory

How to solve ‘DbContextOptionsBuilder’ does not contain a definition for ‘UseSqlServer’ error in .NET Core?

This is another, kind of a classic and simple solution to a fairly simple problem: How to fix it, when your DbContextOptionsBuilder fails to take in your connection string and complains about UseSqlServer missing or whatever? Okay – let’s take a step back. How did we end up here? So, let’s set the scene. You’re building your DbContext (called ApplicationDbContext in the example below) in a .NET Core application of…Continue reading How to solve ‘DbContextOptionsBuilder’ does not contain a definition for ‘UseSqlServer’ error in .NET Core?

.NET logo

How to get the Description for a property in ASP.NET MVC 5?

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 MVC 5 really already has all the bells and whistles – AND the kitchen sink. But no, it does not…Continue reading How to get the Description for a property in ASP.NET MVC 5?

Miina (@minepupper) is fixing them bugs

EF Core returns null for a Navigation property

This article describes how to fix a situation, where you can’t use any of the navigation properties of your Entity Framework Core entities, since they are all null, despite data being in the database for sure. So, another day, another error. This time I can’t blame SharePoint, since I just messed up with ASP.NET Core and Entity Framework Core. :) Symptoms No matter what I’d do, I was getting null…Continue reading EF Core returns null for a Navigation property

.NET Core fundamentals in one picture.

How to fix Microsoft.AspNetCore.Mvc.TagHelpers not being rendered!

Ha – another one, that ended up being a simple fix, but since nobody actually explains it well, took me an hour to figure out. This post ended up being another example of my “I’m going to document every single fix that took me more than 10 minutes to figure out, since that’ll help me (and others) the next time the same issue arises.” blogging strategy. Snappy name, right? 😅…Continue reading How to fix Microsoft.AspNetCore.Mvc.TagHelpers not being rendered!

.NET logo

Current User in ASP.NET Core

This post describes how to get the currently logged-in user using ASP.NET Core. This is compared with how it’s done in ASP.NET Framework. Background In ASP.NET Core (and .NET Core in general), a lot of things are done a bit differently than what you might be used to if you’re coming from the .NET Framework world. That’s what I’ve been learning building more and more stuff with it, instead of…Continue reading Current User in ASP.NET Core

The following functions are in error... And that's about it.

Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Let me start this article, by reminding everyone that Azure Functions are awesome, and you should use them despite some hiccups. Having said that, let’s fix some errors! In the beginning of September 2018, Microsoft started pushing out breaking changes to Azure Functions 2.x. They had announced this a full month in advance, so they expected everyone in the world to update their Azure Functions to avoid the functions from…Continue reading Fixing “The following functions are in error: Object reference not set to an instance of an object.” error in Azure Functions

Azure Functions SDK 2.0 settings in accessed in C# code

How to get application settings for your Azure Function App using C#?

This article explains how you can access an Azure Function’s Application/Environment settings/variables from your C# code. Different versions of Azure Functions have different ways to access the Azure Function settings, but this page should explain the easiest way to get your application setting values for each Azure Functions version! While this is something I need often, it has been another little thing, that I always forget – so better document…Continue reading How to get application settings for your Azure Function App using C#?