Sunmeat.Morph 1.0.0

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

Sunmeat.Morph logo

Sunmeat.Morph

Change the shape. Keep the essence.

Transform anything. Configure only what matters.

Morph maps public .NET models, converts types, clones supported graphs and applies protected updates.

NuGet CI MIT .NET Support development

Українська

Install

Version 1.0.0 is prepared for release. Build and install it locally before publication. Packaging and publication

After publication on NuGet.org, install this version using the .NET CLI.

dotnet add package Sunmeat.Morph --version 1.0.0

Morph targets .NET 8, 9, 10 and 11. The CI matrix shows the verified runtime and OS combinations. Compatibility

Quick start

Map an immutable DTO

using Sunmeat.Morph;

var source = new { Id = 12, Name = "Example", Address = new { City = "Kyiv" } };
var dto = Morph.Map<MemberView>(source);
Console.WriteLine(dto.AddressCity);

record MemberView(int Id, string Name, string AddressCity);

Clone a public graph

using Sunmeat.Morph;

var original = new Project { Tags = ["draft"] };
var copy = Morph.DeepClone(original);
copy.Tags.Add("reviewed");
Console.WriteLine(original.Tags.Count);

sealed class Project
{
    public List<string> Tags { get; set; } = [];
}

Allow only selected updates

using Sunmeat.Morph;

var member = new Member { Name = "Before" };
Morph.Update(member, new { Name = "After", IsAdmin = true },
    options => options.Allow(x => x.Name));

Console.WriteLine(member.Name);

sealed class Member
{
    public string Name { get; set; } = "";
    public bool IsAdmin { get; set; }
}

Inspect a plan

using Sunmeat.Morph;

var plan = Morph.GetPlan<Source, Destination>();
plan.ThrowIfInvalid();
Console.WriteLine(plan.ToText());

record Source(int Id, string Name);
record Destination(long Id, string Name);

Supported operations

Operation What it covers
Object mapping Public fields, properties, nested objects, constructors, records, init-only and required members
Collections and data Arrays, lists, dictionaries, common immutable containers, JSON, dotted paths, streams of items
Conversion and configuration Checked numerics, culture, converters, naming and conditional member rules
Object updates Deep and shallow cloning, copy, merge by key, and allowlisted updates with explicit nulls
Diagnostics Structural plans, validation results, and text, JSON, Markdown and HTML views

Documentation and examples

Getting started · Constructors · Cloning · Protected updates · Security · Benchmarks

Sunmeat ecosystem

Library Purpose
Sunmeat.Prism Serialization
Sunmeat.Pulse Structured logging
Sunmeat.Guard Validation
Sunmeat.Diff Data comparison and patches
Sunmeat.Morph Object mapping and transformation

❤️ Support the project

Sunmeat.Morph is free, open-source software created and maintained by an independent developer.

If Morph saves you time, reduces repetitive mapping code, or becomes a valuable part of your projects, consider supporting its continued development.

Building and maintaining free developer tools takes time, effort, and resources.

Your support helps fund:

  • New mapping and transformation capabilities.
  • Performance improvements and optimizations.
  • Source generators and Native AOT compatibility.
  • Documentation, examples, and automated tests.
  • Long-term maintenance and platform compatibility.
  • Development tools, infrastructure, and AI-assisted development subscriptions.
  • New open-source .NET libraries for the community.

Every contribution, regardless of its size, makes a difference.

Even a small donation can help turn the next idea into another free tool for developers.

Support development

Patreon Monobank

Financial support is entirely optional. All library features remain free and open source.

You can also support the project by starring the repository, reporting issues, contributing code, or sharing Morph with other developers.

Star on GitHub Developer website


Built with curiosity. Shared with the community.

Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

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
1.0.0 84 11/29/2026

Initial release of Sunmeat.Morph.