Skip to content
#

aspnetcore

Here are 2,122 public repositories matching this topic...

bart-degreed
bart-degreed commented Apr 23, 2021

After updating my Web API project from .NET Core 3.1 to .NET 5, I'm getting a warning along the lines of "variable is never null".

var contentType = httpContext.Request.ContentType;

if (contentType != null && contentType != allowedContentType)
{
// ^^^^^^^^^^^^^
}

The warning is incorrect, because when I remove the null check, lots of my integration tests start to fail. Spe

Rick-Anderson
Rick-Anderson commented Jun 2, 2020

Create an include (something like https://github.com/dotnet/AspNetCore.Docs/blob/master/aspnetcore/includes/reservedRouting.md

With the info from https://github.com/dotnet/aspnetcore/wiki/MVC-Reserved-Keywords on routing. Be stronger, something like

These keywords should not be used for link generations, as model bound parameters, or top level properties.

Add the include to the 3

Improve this page

Add a description, image, and links to the aspnetcore topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the aspnetcore topic, visit your repo's landing page and select "manage topics."

Learn more