talira

AutoMapper

The convention-based object-object mapper for .NET

open coreRPL-1.5 OR Lucky Penny Software License Agreementfree

AutoMapper maps one .NET object to another by convention: it copies matching properties from complex domain models to simple, flattened DTOs without hand-written mapping code, with explicit configuration for the cases conventions don't cover. A one-line validation checks that every destination member lines up, and queryable extensions project LINQ queries straight to DTOs so the database returns only what's needed. It supports .NET 8.0+ and .NET Framework 4.6.2+, and has extension points for naming conventions, type converters, value resolvers and dependency injection. From version 15 it's dual licensed by Lucky Penny Software, which also makes MediatR: the Reciprocal Public License 1.5 or a commercial licence, free for small companies.

Problems it solves

  • stop writing boilerplate code that copies fields from my entities to DTOs in C#
  • flatten a complex domain model into a simple view model in .NET
  • catch mapping mistakes when a property is renamed before they reach production
  • project Entity Framework queries straight to DTOs so the database only returns the columns I need
  • map collections, nested objects and inherited types between layers of a .NET app

Features

  • convention-based mapping with flattening, collections, method names and null substitution
  • configuration validation in one method call
  • LINQ projection with queryable extensions
  • custom type converters, value resolvers and value converters
  • dependency injection integration
  • supports .NET 8.0+ and .NET Framework 4.6.2+

Capabilities

Takes pluginsplan not known