How to validate an enum:
if (!Enum.IsDefined(typeof(CategoryGroupStatus), status)) throw new InvalidRequestException($"Status has an invalid value: {status}");
foreach (var item in items ?? Enumerable.Empty<string>())
How to validate an enum:
if (!Enum.IsDefined(typeof(CategoryGroupStatus), status)) throw new InvalidRequestException($"Status has an invalid value: {status}");
foreach (var item in items ?? Enumerable.Empty<string>())