Chd.Mapping 8.0.4

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Chd.Mapping --version 8.0.4
                    
NuGet\Install-Package Chd.Mapping -Version 8.0.4
                    
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="Chd.Mapping" Version="8.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Chd.Mapping" Version="8.0.4" />
                    
Directory.Packages.props
<PackageReference Include="Chd.Mapping" />
                    
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 Chd.Mapping --version 8.0.4
                    
#r "nuget: Chd.Mapping, 8.0.4"
                    
#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 Chd.Mapping@8.0.4
                    
#: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=Chd.Mapping&version=8.0.4
                    
Install as a Cake Addin
#tool nuget:?package=Chd.Mapping&version=8.0.4
                    
Install as a Cake Tool

Caching library for .Net Core

Chd (cleverly handle difficulty) library helps you cleverly handle difficulty, writing code fastly and do your application stable.

📝 Table of Contents

🧐 About

Mapping library is a compile time aspect oriented programming library. This maps object to another object automatically with compile time aspect oriented programming.

🏁 Getting Started

This library is used to map object to another object automatically with compile time aspect oriented programming. In this reason your code do not use reflection for mapping. So your code run faster than other mapping libraries. Debugging is easier than other mapping libraries because mapping is done at compile time. If you use mapping with a package like AutoMapper, your code use reflection for mapping. So your code run slower than mapping with compile time aspect oriented programming. The important reason is that mapping with compile time aspect oriented programming is type safe. So you can catch mapping errors at compile time. Other mapping libraries use reflection for mapping. So you can not catch mapping errors at compile time. You can catch mapping errors at runtime. This is a big disadvantage. Automaticly generating implicit and explicit operator overloads for mapping between classes. Debugging is easier because you can see the mapping code in the generated code. Resolving mapping issues at compile time rather than at runtime, which can help to catch errors early in the development process. More efficient and faster code execution since the mapping code is generated at compile time rather than using reflection at runtime. There are two attribute that you can use for mapping. These are MapTo and MapFrom attributes. MapTo attribute is used to map class to another class. MapFrom attribute is used to map property to another property. MapFrom attribute takes a parameter that is the name of the property that you want to map.

🛠️ Prerequisites

  • You must use .net core 8.0 or higher
  • You must install Fody 6.6.0 or higher for your project. You can install Fody from Nuget Package Manager.
public class SampleEntity
 { public int Id { get; set;} 
 public string Name { get; set;}
 
  }
  [MapTo(typeof(SampleEntity))] //Mapping SampleEntity to SampleDto
 public class SampleDto
 { 
 public int Id { get; set;} 
 [MapFrom("Name")] //Mapping Name property of SampleEntity to FullName property of SampleDto
 public string FullName { get; set;}
 
  }
    ....
    ....
   }

🎈 Usage

static void Main(string[] args)
{
   var dto = new SampleDto { Id = 1, FullName = "Test" };
   var entity=dto;

   }

📑 Test Result

⛏️ Built Using

✍️ Authors

See also the list of contributors who participated in this project.

🎉 Acknowledgements

Thank you for using my library.

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 was computed.  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 was computed.  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