Overview: The CloudNexInnovations.EnumerableExtensions library offers a suite of powerful and versatile extension methods for IEnumerable<T>, enhancing the capability of collections management and data manipulation in .NET. This package provides developers with easy-to-use, efficient methods that extend the base functionality of IEnumerable, allowing for advanced operations such as converting collections to DataTables, filtering, batching, pagination, and complex data joins, among others. Key Features: ToDataTable: Convert any IEnumerable<T> to a DataTable, making it easy to use with data-binding and reporting tools that require tabular data. DistinctBy: Retrieve distinct elements from a collection based on a specified key selector, offering more flexibility than the standard Distinct method. Batch: Split the collection into smaller, more manageable chunks or batches, which is useful for processing large datasets or implementing pagination in processing routines. Paginate: Simplify data pagination directly on collections, which is essential for creating data-driven user interfaces with paging capabilities. MaxBy and MinBy: Determine the maximum or minimum item in a collection based on a specified key selector, enabling more complex comparison logic than what's possible with standard Max or Min methods. Merge and MergeSorted: Combine two sequences in a controlled manner, either by merging them based on matching keys or by merging two already sorted sequences efficiently. FullOuterJoin: Perform a full outer join on two sequences based on specified key selectors, crucial for relational data manipulations not inherently supported by LINQ. Shuffle: Randomize the order of elements in a collection, which is particularly useful in gaming, simulations, or any scenario requiring random distribution of items. Flatten: Convert a hierarchical or nested structure into a flat sequence, useful for processing tree-like data structures such as file systems or organizational hierarchies. DeepCopy: Create a deep copy of a collection where elements implement ICloneable, ensuring that modifications to the copy do not affect the original collection. SmartDistinct and ConditionalDistinct: Provide advanced filtering capabilities that go beyond simple uniqueness, allowing for element selection based on consecutive comparison or conditional logic. RunningTotal: Compute a running total from a sequence of numbers, useful for financial calculations and cumulative statistics. Usage Scenarios: Data transformation and preparation for reporting and data analysis. Enhancing server-side processing of data for web applications, particularly in ASP.NET. Streamlining complex data manipulations that are common in business applications, such as CRM and ERP systems. Utility functions for games and simulations. Compatibility: Designed to integrate seamlessly with any .NET Standard compliant project, supporting a wide range of .NET implementations including .NET Core, .NET Framework, and others.
$ dotnet add package CloudNexInnovations.EnumerableExtensionsCloudNexInnovations.EnumerableExtensions The CloudNexInnovations.EnumerableExtensions is a powerful .NET library providing a suite of extension methods for IEnumerable<T>. This package enhances the functionality of collections in .NET, allowing developers to perform complex data manipulations more efficiently and with fewer lines of code.
Features
Prerequisites
This library is compatible with all .NET Standard compatible frameworks including: