2025-04-02 22:08:17 +01:00

9 lines
344 B
C#

namespace EnotaryoPH.Web.Common.Extensions
{
public static class IEnumerableExtensions
{
public static IEnumerable<T> ToSafeEnumerable<T>(this IEnumerable<T> enumerable) => enumerable ?? Enumerable.Empty<T>();
public static List<T> ToSafeList<T>(this IEnumerable<T> enumerable) => enumerable?.ToList() ?? [];
}
}