Soenneker.Extensions.List.NamedEntity 11.0.1661

Prefix Reserved
dotnet add package Soenneker.Extensions.List.NamedEntity --version 11.0.1661
                    
NuGet\Install-Package Soenneker.Extensions.List.NamedEntity -Version 11.0.1661
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Extensions.List.NamedEntity" Version="11.0.1661" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Extensions.List.NamedEntity" Version="11.0.1661" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Extensions.List.NamedEntity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Extensions.List.NamedEntity --version 11.0.1661
                    
#r "nuget: Soenneker.Extensions.List.NamedEntity, 11.0.1661"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Extensions.List.NamedEntity@11.0.1661
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Extensions.List.NamedEntity&version=11.0.1661
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Extensions.List.NamedEntity&version=11.0.1661
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.List.NamedEntity

Projects named entities into lightweight IdNamePair DTOs, with optional first-ID deduplication.

Installation

dotnet add package Soenneker.Extensions.List.NamedEntity

Copy every entity

using Soenneker.Extensions.List.NamedEntity;

List<IdNamePair> pairs = entities.ToIdNamePairs();

ToIdNamePairs() returns one new DTO for every source item, in the same order:

var entities = new List<INamedEntity>
{
    first,
    second
};

List<IdNamePair> pairs = entities.ToIdNamePairs();

Only Id and Name are copied. The result list and its DTO objects are independent of the source entities; later changes are not synchronized in either direction. Source duplicates are preserved.

Keep the first entity for each ID

List<IdNamePair> unique = entities.ToUniqueIdNamePairs();

ToUniqueIdNamePairs() compares IDs with ordinal, case-sensitive equality. It keeps the first entity for each ID, including that entity's name, and preserves the order in which unique IDs first appear. For example, IDs "ABC" and "abc" are distinct.

Both methods require a non-null List<INamedEntity> whose elements are non-null. An empty source returns a new empty list. They materialize immediately and do not modify the source.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.1661 95 11/11/2026
11.0.1660 70 11/11/2026
11.0.1659 73 11/11/2026
11.0.1658 69 11/11/2026
11.0.1657 75 11/11/2026
11.0.1656 78 11/11/2026
11.0.1655 83 11/11/2026
11.0.1654 77 11/11/2026
11.0.1653 83 11/10/2026
11.0.1652 191 11/3/2026
11.0.1651 98 11/3/2026
11.0.1650 94 11/3/2026
11.0.1649 125 10/30/2026
11.0.1648 102 10/27/2026
11.0.1647 97 10/27/2026
11.0.1646 95 10/26/2026
11.0.1645 97 10/26/2026
11.0.1644 91 10/26/2026
11.0.1643 98 10/26/2026
11.0.1642 98 10/26/2026
Loading failed

Updated Multiple NuGet packages