{"id":19380714,"url":"https://github.com/f1x3d/explicitmapper","last_synced_at":"2026-05-13T08:37:36.060Z","repository":{"id":144136230,"uuid":"552529129","full_name":"f1x3d/ExplicitMapper","owner":"f1x3d","description":"An explicit object mapper pattern for C#/.NET","archived":false,"fork":false,"pushed_at":"2022-10-16T20:48:30.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-05T05:06:19.007Z","etag":null,"topics":["asp-net-core","csharp","dotnet","hacktoberfest","object-mapper","patterns"],"latest_commit_sha":null,"homepage":"","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/f1x3d.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}},"created_at":"2022-10-16T19:47:59.000Z","updated_at":"2022-10-16T20:15:11.000Z","dependencies_parsed_at":"2023-08-09T17:35:16.073Z","dependency_job_id":null,"html_url":"https://github.com/f1x3d/ExplicitMapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/f1x3d/ExplicitMapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1x3d%2FExplicitMapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1x3d%2FExplicitMapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1x3d%2FExplicitMapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1x3d%2FExplicitMapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f1x3d","download_url":"https://codeload.github.com/f1x3d/ExplicitMapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1x3d%2FExplicitMapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32975180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["asp-net-core","csharp","dotnet","hacktoberfest","object-mapper","patterns"],"created_at":"2024-11-10T09:14:37.376Z","updated_at":"2026-05-13T08:37:36.052Z","avatar_url":"https://github.com/f1x3d.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ExplicitMapper\n\nAn explicit object mapper pattern for C#/.NET\n\n## Motivation\n\n* Better developer experience\n    * Easily navigate to the mapping method implementation from the calling side\n    * Autocomplete available target types based on the mapping source\n\n* Support for multiple mappings for the same source/target type pair\n\n* Compared to convention-based mappers, renaming a source/target property won't silently break anything\n\n### \u0026emsp; \"There are a lot of complex objects with many properties in my project, it would require too much time to map them manually\"\n\nYou can use the [Mapping Generator extension](https://marketplace.visualstudio.com/items?itemName=54748ff9-45fc-43c2-8ec5-cf7912bc3b84.MappingGenerator2022) that will generate the corresponding mapping methods for you.\n\n### \u0026emsp; \"I would prefer the convention-based approach instead of the mapping methods for most of my objects\"\n\nYou can still have it - add an `ExplicitMapper` constructor with the AutoMapper's `IMapper` parameter, pass it down to the `ExplicitMapperFromSource` and use it to implement `ToTarget()` mapping methods:\n\n```csharp\npublic partial class ExplicitMapper\n{\n    private readonly IMapper _mapper;\n\n    public ExplicitMapper(IMapper mapper)\n    {\n        _mapper = mapper;\n    }\n}\n```\n\n```csharp\npublic partial class ExplicitMapper\n{\n    public ExplicitMapperFromSource Map(Source source) =\u003e new(_mapper, source);\n}\n\npublic partial class ExplicitMapperFromSource\n{\n    private readonly IMapper _mapper;\n    private readonly Source _source;\n\n    public ExplicitMapperFromSource(IMapper mapper, Source source)\n    {\n        _mapper = mapper;\n        _source = source;\n    }\n}\n```\n\n```csharp\npublic partial class ExplicitMapperFromSource\n{\n    public Target ToTarget() =\u003e _mapper.Map\u003cTarget\u003e(_source);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1x3d%2Fexplicitmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff1x3d%2Fexplicitmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1x3d%2Fexplicitmapper/lists"}