{"id":48540165,"url":"https://github.com/panoramicdata/panoramicdata.mapper","last_synced_at":"2026-04-08T04:01:50.810Z","repository":{"id":344594494,"uuid":"1182001262","full_name":"panoramicdata/PanoramicData.Mapper","owner":"panoramicdata","description":"A minimal, API-compatible replacement for AutoMapper. Supports convention-based mapping, ForMember, Ignore, MapFrom, AfterMap, ProjectTo, and DI integration.","archived":false,"fork":false,"pushed_at":"2026-03-31T07:28:18.000Z","size":103,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T09:38:15.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/panoramicdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T22:55:41.000Z","updated_at":"2026-03-31T07:27:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/panoramicdata/PanoramicData.Mapper","commit_stats":null,"previous_names":["panoramicdata/panoramicdata.mapper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/panoramicdata/PanoramicData.Mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FPanoramicData.Mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FPanoramicData.Mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FPanoramicData.Mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FPanoramicData.Mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panoramicdata","download_url":"https://codeload.github.com/panoramicdata/PanoramicData.Mapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panoramicdata%2FPanoramicData.Mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31539229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-08T04:01:50.024Z","updated_at":"2026-04-08T04:01:50.801Z","avatar_url":"https://github.com/panoramicdata.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# PanoramicData.Mapper\n\nA comprehensive, MIT-licensed, API-compatible replacement for AutoMapper.\n\n[![Nuget](https://img.shields.io/nuget/v/PanoramicData.Mapper)](https://www.nuget.org/packages/PanoramicData.Mapper/)\n[![Nuget](https://img.shields.io/nuget/dt/PanoramicData.Mapper)](https://www.nuget.org/packages/PanoramicData.Mapper/)\n![License](https://img.shields.io/github/license/panoramicdata/PanoramicData.Mapper)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/95dd8997738d4ffb8daf60c1b85a605d)](https://app.codacy.com/gh/panoramicdata/PanoramicData.Mapper/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n\n## Overview\n\nPanoramicData.Mapper is a comprehensive, API-compatible replacement for AutoMapper with convention-based object mapping, explicit member configuration, and advanced features including mapping inheritance, value resolvers, type converters, open generics, EF Core projection, and more.\nIt is a clean-room, black-box reimplementation — no AutoMapper source code was referenced.\n\n## Supported Features\n\n- **Convention-based mapping** — properties with matching names and compatible types map automatically\n- **Profile-based configuration** — derive from `Profile` and call `CreateMap\u003cTSource, TDestination\u003e()`\n- **ForMember / Ignore** — skip specific destination properties\n- **ForMember / MapFrom** — custom source expressions including nested property access\n- **BeforeMap / AfterMap** — inline lambda and generic `IMappingAction\u003cTSrc, TDest\u003e` pre/post-mapping callbacks\n- **ForAllMembers** — apply configuration to all destination members\n- **ReverseMap** — `.ReverseMap()` creates the inverse mapping automatically\n- **ConvertUsing** — lambda, `ITypeConverter\u003cTSrc, TDst\u003e` type, or instance for full-type conversion\n- **ConstructUsing** — custom destination construction via lambda\n- **ForPath** — `.ForPath(d =\u003e d.Inner.Prop, opt =\u003e ...)` for deep nested member configuration\n- **ForCtorParam** — `.ForCtorParam(\"name\", opt =\u003e ...)` for constructor parameter mapping\n- **Condition / PreCondition** — conditional member mapping (evaluated after/before value resolution)\n- **NullSubstitute** — substitute a default value when the source resolves to null\n- **Value Resolvers** — `IValueResolver\u003cTSrc, TDst, TMember\u003e` for custom resolution logic\n- **Mapping Inheritance** — `Include`, `IncludeBase`, `IncludeAllDerived` for polymorphic hierarchies\n- **Value Transformers** — `.AddTransform\u003cT\u003e(expr)` for per-type value transforms\n- **Open Generics** — `CreateMap(typeof(Source\u003c\u003e), typeof(Dest\u003c\u003e))` for generic type mappings\n- **UseDestinationValue** — preserve existing destination property values\n- **MaxDepth** — `.MaxDepth(n)` to limit recursive mapping depth\n- **Map to new** — `mapper.Map\u003cTDest\u003e(source)` creates a new destination\n- **Map to existing** — `mapper.Map(source, destination)` updates an existing object\n- **ProjectTo** — `IQueryable\u003cT\u003e.ProjectTo\u003cTDest\u003e(configurationProvider)` for EF Core SQL projection\n- **[Ignore] attribute** — `PanoramicData.Mapper.Configuration.Annotations.IgnoreAttribute`\n- **Nested mappings** — recursive mapping of complex child types and collection properties when a CreateMap exists for the child types\n- **Collection/List/Array mapping** — `mapper.Map\u003cList\u003cDest\u003e\u003e(sourceList)` maps collections automatically when an element-type map is registered\n- **Flattening** — PascalCase destination property names are split and traversed on the source graph (e.g. `CustomerName` → `Customer.Name`); also matches `GetX()` methods\n- **AssertConfigurationIsValid** — detects unmapped destination properties at startup\n- **IgnoreAllPropertiesWithAnInaccessibleSetter** — extension method to ignore all destination properties with non-public or absent setters\n- **DI integration** — `AddAutoMapper()` extension methods for `IServiceCollection`\n\n## Installation\n\n```bash\ndotnet add package PanoramicData.Mapper\n```\n\n## Quick Start\n\n```csharp\nusing PanoramicData.Mapper;\n\n// Define a profile\npublic class MyProfile : Profile\n{\n    public MyProfile()\n    {\n        CreateMap\u003cSource, Destination\u003e()\n            .ForMember(d =\u003e d.Secret, opt =\u003e opt.Ignore())\n            .ForMember(d =\u003e d.FullName, opt =\u003e opt.MapFrom(s =\u003e s.FirstName + \" \" + s.LastName));\n    }\n}\n\n// Configure and use\nvar config = new MapperConfiguration(cfg =\u003e cfg.AddProfile\u003cMyProfile\u003e());\nconfig.AssertConfigurationIsValid();\n\nIMapper mapper = config.CreateMapper();\nvar dest = mapper.Map\u003cDestination\u003e(source);\n```\n\n## DI Registration\n\n```csharp\n// In Program.cs / Startup.cs\nservices.AddAutoMapper(typeof(MyProfile).Assembly);\n\n// Or with explicit configuration\nservices.AddAutoMapper(cfg =\u003e cfg.AddProfile\u003cMyProfile\u003e());\n```\n\n## Migration from AutoMapper\n\n1. Replace the `AutoMapper` NuGet package with `PanoramicData.Mapper`\n2. Update `using` directives:\n   - `using AutoMapper;` → `using PanoramicData.Mapper;`\n   - `using AutoMapper.QueryableExtensions;` → `using PanoramicData.Mapper.QueryableExtensions;`\n   - `using AutoMapper.Configuration.Annotations;` → `using PanoramicData.Mapper.Configuration.Annotations;`\n3. The `AddAutoMapper()` DI extension methods and all type names (`Profile`, `IMapper`, `MapperConfiguration`, etc.) remain the same\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fpanoramicdata.mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanoramicdata%2Fpanoramicdata.mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanoramicdata%2Fpanoramicdata.mapper/lists"}