FlexJobApi.Core/Utils/StringUtils/StringUtils.cs
@@ -35,9 +35,10 @@ return !str.IsNull(); } public static Guid? ToGuid(this string str) public static Guid? ToGuid(this string str, string requiredMessage = null) { if (str.IsNotNull() && Guid.TryParse(str, out var guid) && guid != Guid.Empty) return guid; if (requiredMessage.IsNotNull()) throw Oops.Oh(EnumErrorCodeType.s400, requiredMessage); return null; }