PanoramicData.Mapper
10.0.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PanoramicData.Mapper --version 10.0.1
NuGet\Install-Package PanoramicData.Mapper -Version 10.0.1
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="PanoramicData.Mapper" Version="10.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PanoramicData.Mapper" Version="10.0.1" />
<PackageReference Include="PanoramicData.Mapper" />
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 PanoramicData.Mapper --version 10.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PanoramicData.Mapper, 10.0.1"
#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 PanoramicData.Mapper@10.0.1
#: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=PanoramicData.Mapper&version=10.0.1
#tool nuget:?package=PanoramicData.Mapper&version=10.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PanoramicData.Mapper
A minimal, MIT-licensed, API-compatible replacement for AutoMapper.
Overview
PanoramicData.Mapper provides a subset of AutoMapper's API surface sufficient for convention-based object mapping with explicit member configuration. It is a clean-room, black-box reimplementation — no AutoMapper source code was referenced.
Supported Features
- Convention-based mapping — properties with matching names and compatible types map automatically
- Profile-based configuration — derive from
Profileand callCreateMap<TSource, TDestination>() - ForMember / Ignore — skip specific destination properties
- ForMember / MapFrom — custom source expressions including nested property access
- AfterMap — inline lambda and generic
IMappingAction<TSrc, TDest>post-mapping callbacks - ForAllMembers — apply configuration to all destination members
- Map to new —
mapper.Map<TDest>(source)creates a new destination - Map to existing —
mapper.Map(source, destination)updates an existing object - ProjectTo —
IQueryable<T>.ProjectTo<TDest>(configurationProvider)for EF Core SQL projection - [Ignore] attribute —
PanoramicData.Mapper.Configuration.Annotations.IgnoreAttribute - AssertConfigurationIsValid — detects unmapped destination properties at startup
- DI integration —
AddAutoMapper()extension methods forIServiceCollection
Installation
dotnet add package PanoramicData.Mapper
Quick Start
using PanoramicData.Mapper;
// Define a profile
public class MyProfile : Profile
{
public MyProfile()
{
CreateMap<Source, Destination>()
.ForMember(d => d.Secret, opt => opt.Ignore())
.ForMember(d => d.FullName, opt => opt.MapFrom(s => s.FirstName + " " + s.LastName));
}
}
// Configure and use
var config = new MapperConfiguration(cfg => cfg.AddProfile<MyProfile>());
config.AssertConfigurationIsValid();
IMapper mapper = config.CreateMapper();
var dest = mapper.Map<Destination>(source);
DI Registration
// In Program.cs / Startup.cs
services.AddAutoMapper(typeof(MyProfile).Assembly);
// Or with explicit configuration
services.AddAutoMapper(cfg => cfg.AddProfile<MyProfile>());
Migration from AutoMapper
- Replace the
AutoMapperNuGet package withPanoramicData.Mapper - Update
usingdirectives:using AutoMapper;→using PanoramicData.Mapper;using AutoMapper.QueryableExtensions;→using PanoramicData.Mapper.QueryableExtensions;using AutoMapper.Configuration.Annotations;→using PanoramicData.Mapper.Configuration.Annotations;
- The
AddAutoMapper()DI extension methods and all type names (Profile,IMapper,MapperConfiguration, etc.) remain the same
Out of Scope
Features not currently implemented:
IValueResolver,ITypeConverter,ConvertUsing,ConstructUsingReverseMap,ForCtorParam,PreCondition,ConditionNullSubstitute,UseDestinationValue,ForPath,MaxDepthIncludeBase,IncludeAllDerived- Nested mappings (recursive child object mapping)
- Collection/List/Array mapping (automatic element-type mapping)
- Flattening (PascalCase member name splitting)
- Open generics
- Async mapping
- BeforeMap (AfterMap is supported)
License
MIT — see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PanoramicData.Mapper:
| Package | Downloads |
|---|---|
|
LogicMonitor.Datamart
LogicMonitor Datamart |
GitHub repositories
This package is not used by any popular GitHub repositories.