Piri.Extensions.DependencyInjection
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package Piri.Extensions.DependencyInjection --version 1.0.0
NuGet\Install-Package Piri.Extensions.DependencyInjection -Version 1.0.0
<PackageReference Include="Piri.Extensions.DependencyInjection" Version="1.0.0" />
<PackageVersion Include="Piri.Extensions.DependencyInjection" Version="1.0.0" />
<PackageReference Include="Piri.Extensions.DependencyInjection" />
paket add Piri.Extensions.DependencyInjection --version 1.0.0
#r "nuget: Piri.Extensions.DependencyInjection, 1.0.0"
#:package Piri.Extensions.DependencyInjection@1.0.0
#addin nuget:?package=Piri.Extensions.DependencyInjection&version=1.0.0
#tool nuget:?package=Piri.Extensions.DependencyInjection&version=1.0.0
Piri
Simple object mapper for C#
Overview
Piri is a lightweight and easy-to-use object mapper for C#. It allows you to map objects of one type to another with minimal configuration. This can be particularly useful when working with data transfer objects (DTOs) and domain models.
- Simple and intuitive API
- High performance
- Supports complex mappings
- Customizable mappings
- Fluent configuration
Installation
You can install Piri via NuGet Package Manager. Run the following command in the Package Manager Console:
Install-Package Piri
Getting Started
Let's say you have the following source and destination classes:
public class Source
{
public int Id { get; set; }
public string Name { get; set; }
}
public class Destination
{
public int Id { get; set; }
public string FullName { get; set; }
}
You can map a Source object to a Destination object like this:
using Piri.Core
public class Program
{
public static void Main()
{
IMapper mapper = PiriMapper.Create(options => {
options.AddMap<Source, Destination>(source => new Destination {
Id = source.Id,
FullName = source.Name
});
});
var source = new Source { Id = 1, Name = "John Doe" };
var destination = mapper.Map<Destination>(source);
Console.WriteLine($"Id: {destination.Id}, FullName: {destination.FullName}");
}
}
Documentation
For more detailed documentation and advanced usage, please refer to the official documentation.
Contributing
We welcome contributions to Piri. If you would like to contribute, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
License
Piri is licensed under the MIT License. See the LICENSE file for more information.
Contact
If you have any questions or feedback, feel free to reach out to us at me@gturkmen.com.
Product | Versions 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Piri (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.