maksit-core/src/MaksIT.Core/Extensions/GuidExtensions.cs
Maksym Sadovnychyy 8ac380c7d4 (feature): init
2024-09-03 18:38:52 +02:00

16 lines
365 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MaksIT.Core.Extensions {
public static class GuidExtensions {
public static Guid? ToNullable(this Guid id) {
// Return null if the Guid is the default value (Guid.Empty)
return id == default ? null : id;
}
}
}