From cb253fd195d0bda0e94a4b09d7b9fa671113b8d6 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Tue, 28 Jun 2022 19:52:26 +0200 Subject: [PATCH] Make Id key property required (fixes #342) --- XmlSchemaClassGenerator/TypeModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index 7a72a269..659a88aa 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -361,7 +361,8 @@ public override CodeTypeDeclaration Generate() Documentation = { new() { Language = English, Text = "Gets or sets a value uniquely identifying this entity." }, new() { Language = German, Text = "Ruft einen Wert ab, der diese Entität eindeutig identifiziert, oder legt diesen fest." } - } + }, + IsRequired = true }; Properties.Insert(0, keyProperty); }