Razor Pages Model NullReferenceException

added by DotNetKicks
11/14/2017 10:19:20 PM

2 Kicks, 309 Views

Here's a quick tip: If you're adding a new Razor Page to an ASP.NET Core 2.0+ project, and you add a codebehind model class, but then when you try to use it you get a NullReferenceException, this might be why.