Skip to content

Latest commit

 

History

History
89 lines (61 loc) · 2.79 KB

File metadata and controls

89 lines (61 loc) · 2.79 KB

Simple.AutoMapper

NuGet .NET License Downloads Coverage

High-performance object mapping for .NET with expression tree compilation. Simple API, powerful configuration options.

Latest - Patch overloads (new object, type-inferred, collection), Map in-place via ISimpleMapper. See Release Notes.

Installation

dotnet add package Simple.AutoMapper

Target Frameworks: netstandard2.0, netstandard2.1, net8.0, net9.0, net10.0

Quick Start

using Simple.AutoMapper.Core;

// Map — copy all properties to new object
var dto = Mapper.Map<User, UserDto>(user);

// Patch — copy only non-null properties (HTTP PATCH scenario)
Mapper.Patch(partialDto, existingEntity);

Before & After

// ❌ Without Simple.AutoMapper — manual property-by-property copy
var dto = new UserDto();
dto.Id = user.Id;
dto.FirstName = user.FirstName;
dto.LastName = user.LastName;
dto.Email = user.Email;
// ... repeat for every property, every model, every service

// ✅ With Simple.AutoMapper — one line
var dto = Mapper.Map<User, UserDto>(user);

For the full before/after comparison of every feature, see the Usage Guide.

Performance

  • Expression tree compilation for fast subsequent mappings
  • Thread-safe caching of compiled mappers
  • First mapping incurs compilation cost; subsequent calls are optimized

Test Coverage

  • 242+ tests passing
  • 92.9% line coverage, 88.8% branch coverage

Documentation

Samples

Sample Location Demonstrates
Console samples/Console/ All 19 features with static Mapper
WebAPI samples/WebAPI/ REST API with DI, PUT/PATCH endpoints

License

MIT License - see LICENSE.md

Team

Core Development Team

  • SEONGAHN - Lead Developer & Project Architect
  • YUJIN - Senior Developer & Exchange Integration Specialist
  • SEJIN - Software Developer & API Implementation

Built with care by the ODINSOFT Team | GitHub