namespace DD.Persistence.Repository.Extensions; public static class IEnumerableExtensions { public static void ForEach(this IEnumerable source, Action action) { if (source == null) throw new ArgumentNullException(nameof(source)); if (action == null) throw new ArgumentNullException(nameof(action)); foreach (var item in source) { action(item); } } }