UniverseQuery 3.2.0-preview2

This is a prerelease version of UniverseQuery.
dotnet add package UniverseQuery --version 3.2.0-preview2
                    
NuGet\Install-Package UniverseQuery -Version 3.2.0-preview2
                    
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="UniverseQuery" Version="3.2.0-preview2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UniverseQuery" Version="3.2.0-preview2" />
                    
Directory.Packages.props
<PackageReference Include="UniverseQuery" />
                    
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 UniverseQuery --version 3.2.0-preview2
                    
#r "nuget: UniverseQuery, 3.2.0-preview2"
                    
#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 UniverseQuery@3.2.0-preview2
                    
#: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=UniverseQuery&version=3.2.0-preview2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=UniverseQuery&version=3.2.0-preview2&prerelease
                    
Install as a Cake Tool

POCO.Mapper

An alternative "Plain Old C# Objects" mapper with minimal configuration required.

POCO stands for "Plain Old C# Object" or "Plain Old CLR Object", depending on who you ask. This library is a custom mapper for POCOs (map values of identical properties from one POCO to another POCO). Minimal configuration is needed.

Nuget Nuget License

Why?

Click me to learn more

How-To

NuGet

Add as reference in your class

using POCO.Mapper;
using POCO.Mapper.Extension;

Let's say you have a different POCO for database models and for view-models. MappedTo("") attribute is required to map the property to a target POCO.

Note: *As of v2.0.0, you'll have an option to use extension methods or the IMapper interface. For extension methods, it is required that a POCO inherits from POCO.Mapper.Extension.ModelMap.

/// <summary>
/// POCO entity based on actual database table
/// </summary>
public class Employee : ModelMap
{
    [MappedTo("Id")]
    public long EmployeeId { get; set; }
    
    public string FirstName { get; set; } // Will not be mapped
    
    public string Lastname { get; set; } // Will not be mapped
    
    [MappedTo("BDay")]
    [UseFormat("yyyy-MMM-dd")]
    public DateTime BirthDate { get; set; }
    
    [MappedTo("EmployeeName")]
    public string FullName
    {
        get { return Lastname + ", " + FirstName;  }
    }
    
    [MappedTo("WorkView")]
    public Work Work { get; set; } = new Work();
}

public class Work : ModelMap
{
    public Guid WorkId { get; set; } // Will not be mapped
    
    [MappedTo("JobTitle")]
    public string Title { get; set; }
    
    [MappedTo("WorkAddress")]
    [IgnoreIf(typeof(AnotherObject))] // This property will not get mapped if the target type is AnotherObject
    public string Address { get; set; }
}

/// <summary>
/// POCO view-model entity which will be consumed outside of your data layer
/// </summary>
public class EmployeeViewModel
{
    public long Id { get; set; }
    public string EmployeeName { get; set; }
    public string FirstName { get; set; } // Will be ignored
    public string Lastname { get; set; } // Will be ignored
    public string BDay { get; set; }
    public WorkViewModel WorkView { get; set; } = new WorkViewModel();
}

public class WorkViewModel
{
    public string JobTitle { get; set; }
    public string WorkAddress { get; set; }
}

Using IMapper Interface

void Map()
{
    // Example Data Only
    using Employee _employee = new Employee
    {
        EmployeeId = 1,
        FirstName = "Nor",
        Lastname = "Gelera",
        BirthDate = DateTime.Now,
        Work = new Work
        {
            WorkId = Guid.NewGuid(),
            Title = ".NET Developer",
            Address = "Cebu"
        }
    };

    // Initialize Mapper
    IMapper<EmployeeViewModel, Employee> _mapper = new ModelMapper<EmployeeViewModel, Employee>();

    // Map to view-model
    EmployeeViewModel _employeeViewModel = _mapper.from(_employee);
}

Using Extension Methods

void Map()
{
    // Example Data Only
    using Employee _employee = new Employee
    {
        EmployeeId = 1,
        FirstName = "Nor",
        Lastname = "Gelera",
        Work = new Work
        {
            WorkId = Guid.NewGuid(),
            Title = ".NET Developer",
            Address = "Cebu"
        }
    };

    // Map to view-model
    EmployeeViewModel _employeeViewModel = _employee.MapTo<EmployeeViewModel>();
}

The result would be an instance of EmployeeViewModel with values for Id, EmployeeName, BDay from Employee entity. FirstName and LastName properties of Employee entity will be ignored by POCOMapper and will not be mapped to EmployeeViewModel. Values for Work property of Employee will also be mapped to WorkViewModel.

Note: As of the current version, POCO.Mapper also supports mapping of values for IList<>, List<> and Array[] properties (interchangeably).

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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
3.2.0-preview2 65 1/15/2026
3.2.0-preview1 344 12/4/2025
3.1.1 921 11/11/2025
3.1.0 520 10/27/2025
3.0.5 493 8/5/2025
3.0.4 207 7/15/2025
3.0.3 149 6/27/2025
3.0.2 146 5/31/2025
2.1.0 539 3/25/2025
2.0.1 265 9/24/2023
2.0.0 393 3/31/2023
1.4.1 733 1/20/2023
1.4.0 1,015 10/20/2022
1.3.2 739 10/11/2022
1.2.1 967 8/22/2022
1.2.0 585 8/12/2022
1.1.4 638 8/5/2022