API

PropertyBuilder.IsRequired

Configures required model property nullability; does not validate nonempty text.

Formal Syntax & Structure

csharp syntaxcsharp
model.Entity<Book>().Property(b => b.Title).IsRequired()

Working Example

Example Snippetcsharp
// Documentary fragment; see mapped lesson for context.model.Entity<Book>().Property(b => b.Title).IsRequired()
C# & .NET Reference