{"id":18982387,"url":"https://github.com/dimitrietataru/ace-csharp-structured-automapper","last_synced_at":"2026-06-16T23:31:59.662Z","repository":{"id":158500322,"uuid":"617674325","full_name":"dimitrietataru/ace-csharp-structured-automapper","owner":"dimitrietataru","description":"Structured AutoMapper","archived":false,"fork":false,"pushed_at":"2026-06-15T11:10:19.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"ace","last_synced_at":"2026-06-15T13:08:07.695Z","etag":null,"topics":["automapper","automapper-profiles","csharp","one-way-profile","two-way-profile"],"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/dimitrietataru.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":"2023-03-22T21:50:11.000Z","updated_at":"2026-06-15T11:10:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"8df0bb8f-a664-4a82-8c91-43f8bb16ba0e","html_url":"https://github.com/dimitrietataru/ace-csharp-structured-automapper","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/dimitrietataru/ace-csharp-structured-automapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrietataru%2Face-csharp-structured-automapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrietataru%2Face-csharp-structured-automapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrietataru%2Face-csharp-structured-automapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrietataru%2Face-csharp-structured-automapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimitrietataru","download_url":"https://codeload.github.com/dimitrietataru/ace-csharp-structured-automapper/tar.gz/refs/heads/ace","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimitrietataru%2Face-csharp-structured-automapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34428196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"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":["automapper","automapper-profiles","csharp","one-way-profile","two-way-profile"],"created_at":"2024-11-08T16:13:18.772Z","updated_at":"2026-06-16T23:31:59.647Z","avatar_url":"https://github.com/dimitrietataru.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ace.CSharp.StructuredAutoMapper\n\n[![build](https://github.com/dimitrietataru/ace-csharp-structured-automapper/actions/workflows/build.yml/badge.svg?branch=ace)](https://github.com/dimitrietataru/ace-csharp-structured-automapper/actions/workflows/build.yml)\n[![release](https://github.com/dimitrietataru/ace-csharp-structured-automapper/actions/workflows/release.yml/badge.svg)](https://github.com/dimitrietataru/ace-csharp-structured-automapper/actions/workflows/release.yml)\n\n[![Nuget | Ace.CSharp.StructuredAutoMapper](https://img.shields.io/nuget/v/AceCSharp.StructuredAutoMapper)](https://www.nuget.org/packages/AceCSharp.StructuredAutoMapper)\n[![Nuget | Ace.CSharp.StructuredAutoMapper.Abstractions](https://img.shields.io/nuget/v/AceCSharp.StructuredAutoMapper.Abstractions)](https://www.nuget.org/packages/AceCSharp.StructuredAutoMapper.Abstractions)\n[![Nuget | Ace.CSharp.StructuredAutoMapper.Abstractions.Test](https://img.shields.io/nuget/v/AceCSharp.StructuredAutoMapper.Abstractions.Test)](https://www.nuget.org/packages/AceCSharp.StructuredAutoMapper.Abstractions.Test)\n\n## Usage\n\n### One-way Mapping Profile\n``` csharp\nrecord BarEntity(Guid Id, string Value);\nrecord BarDto(Guid Id, string Value);\n\nclass BarMappingProfile : OneWayProfile\u003cBarEntity, BarDto\u003e\n{\n}\n```\n\n### Two-way Mapping Profile\n``` csharp\nrecord FooEntity(Guid Id, string Value);\nrecord FooDto(Guid Id, string Value);\n\nclass FooMappingProfile : TwoWayProfile\u003cFooEntity, FooDto\u003e\n{\n}\n```\n\n### Two-way Mapping Profile (Explicit)\n``` csharp\nclass TransactionEntity\n{\n    public int Id { get; set; }\n    public Guid OperatorId { get; set; }\n\n    public DateTimeOffset ProcessedAt { get; set; }\n    public double Amount { get; set; }\n}\n\nclass TransactionDto\n{\n    public int Id { get; set; }\n\n    public long ProcessedAt { get; set; }\n    public double Amount { get; set; }\n}\n\nclass TransactionMappingProfile : TwoWayProfile\u003cTransactionEntity, TransactionDto\u003e\n{\n    public override void ConfigureLeftToRightMapping()\n    {\n        CreateMap\u003cTransactionEntity, TransactionDto\u003e()\n            .ForMember(\n                dto =\u003e dto.Id,\n                options =\u003e options.MapFrom(entity =\u003e entity.Id))\n            .ForMember(\n                dto =\u003e dto.ProcessedAt,\n                options =\u003e options.MapFrom(entity =\u003e entity.ProcessedAt.ToUnixTimeMilliseconds()))\n            .ForMember(\n                dto =\u003e dto.Amount,\n                options =\u003e options.MapFrom(entity =\u003e entity.Amount));\n    }\n\n    public override void ConfigureRightToLeftMapping()\n    {\n        CreateMap\u003cTransactionDto, TransactionEntity\u003e()\n            .ForMember(\n                entity =\u003e entity.Id,\n                options =\u003e options.MapFrom(dto =\u003e dto.Id))\n            .ForMember(\n                entity =\u003e entity.OperatorId,\n                options =\u003e options.Ignore())\n            .ForMember(\n                entity =\u003e entity.ProcessedAt,\n                options =\u003e options.MapFrom(dto =\u003e DateTimeOffset.FromUnixTimeMilliseconds(dto.ProcessedAt)))\n            .ForMember(\n                entity =\u003e entity.Amount,\n                options =\u003e options.MapFrom(dto =\u003e dto.Amount));\n    }\n}\n```\n\n## Tests\nhttps://github.com/dimitrietataru/ace-csharp-structured-automapper/blob/c6ea69337be410cbaa96df3db9c57e6d01308b07/src/sample/Ace.CSharp.StructuredAutoMapper.Sample.Tests/BarMappingProfileTests.cs#L8-L43\nhttps://github.com/dimitrietataru/ace-csharp-structured-automapper/blob/c6ea69337be410cbaa96df3db9c57e6d01308b07/src/sample/Ace.CSharp.StructuredAutoMapper.Sample.Tests/FooMappingProfileTests.cs#L8-L54\nhttps://github.com/dimitrietataru/ace-csharp-structured-automapper/blob/c6ea69337be410cbaa96df3db9c57e6d01308b07/src/sample/Ace.CSharp.StructuredAutoMapper.Sample.Tests/TransactionMappingProfileTests.cs#L8-L70\n\n### See also\n* [AutoMapper](https://github.com/AutoMapper/AutoMapper)\n* [FluentAssertions](https://github.com/fluentassertions/fluentassertions)\n\n### License\nAceCSharp.StructuredAutoMapper is Copyright © 2023 [Dimitrie Tataru](https://github.com/dimitrietataru) and other contributors under the [MIT license](https://github.com/dimitrietataru/ace-csharp-structured-automapper/blob/ace/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrietataru%2Face-csharp-structured-automapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimitrietataru%2Face-csharp-structured-automapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimitrietataru%2Face-csharp-structured-automapper/lists"}