Skip to content

Commit

Permalink
BO MaBisZaehlpunkt: Make Id nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
hf-kklein committed Aug 18, 2024
1 parent 6f36e91 commit a56196f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BO4E/BO/MabisZaehlpunkt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ public class MabisZaehlpunkt : BusinessObject
/// z.B. DE 47108151234567
/// </summary>
[DefaultValue("|null|")]
[JsonProperty(PropertyName = "Id", Required = Required.Always, Order = 10)]
[JsonProperty(PropertyName = "Id", Required = Required.Default, Order = 10)]
[JsonPropertyName("Id")]
[JsonPropertyOrder(10)]
[DataCategory(DataCategory.POD)]
[BoKey]
[ProtoMember(4)]
public string Id { get; set; }
public string? Id { get; set; }


/// <summary>
/// Test if a <paramref name="id" /> is a valid messlokations ID.
/// </summary>
/// <param name="id">id to test</param>
/// <returns></returns>
public static bool ValidateId(string id)
public static bool ValidateId(string? id)
{
return !string.IsNullOrWhiteSpace(id) && RegexValidate.IsMatch(id);
}
Expand Down

0 comments on commit a56196f

Please sign in to comment.