Why does Visual Studio thing my document type property is nullable when the property is made "manditory" in the backoffice?

Hi @Eaglef90

Models Builder marks every reference-type property as nullable because it doesn’t take validation into account. Mandatory is a backoffice thing, and even there it only stops you publishing. You can still save a draft with the field empty, including via the API.

Simplest fix is to fall back to an empty string:

Headline = x.Headline ?? String.Empty,

Or you can tell the compiler it’s never null, but that’s a bit of a risk:

Headline = x.Headline!,

Justin