9 lines
344 B
C#
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() ?? [];
|
|
}
|
|
} |