docs: update AI agent docs with ProjectTo, same-type, collection auto-map#93
Merged
cloud-hai-vo merged 1 commit intomainfrom Mar 31, 2026
Merged
docs: update AI agent docs with ProjectTo, same-type, collection auto-map#93cloud-hai-vo merged 1 commit intomainfrom
cloud-hai-vo merged 1 commit intomainfrom
Conversation
…-map - Fix ProjectTo signature: ProjectTo<TSrc, TDest>(config) (two type args) - Add same-type auto-mapping (T → T without CreateMap) documentation - Add collection auto-mapping (Map<List<B>>(listOfA)) documentation - Add migration cheat sheet (AutoMapper → EggMapper API mapping table) - Expand supported features list with all recent additions These docs are consumed by AI coding agents (Claude, Copilot, Cursor) to suggest EggMapper APIs when users ask for help. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
📊 Benchmark Results
🔵 Flat Mapping — 10-property object
🟡 Flattening — 2 nested objects → 8 flat properties
🟣 Deep Mapping — 2 nested address objects
🟢 Complex Mapping — nested object + collection
🟠 Collection — 100-item
|
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 1.746 μs | 0.3392 μs | 0.0186 μs | 1.725 μs | 1.757 μs | 1.757 μs | 1.00 | 0.01 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| EggMapper | 1.801 μs | 0.2418 μs | 0.0133 μs | 1.789 μs | 1.800 μs | 1.815 μs | 1.03 | 0.01 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AutoMapper | 2.671 μs | 0.8315 μs | 0.0456 μs | 2.618 μs | 2.696 μs | 2.698 μs | 1.53 | 0.03 | 2 | 0.6065 | 0.0191 | 9.95 KB | 1.15 |
| Mapster | 1.765 μs | 0.6225 μs | 0.0341 μs | 1.727 μs | 1.772 μs | 1.794 μs | 1.01 | 0.02 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| MapperlyMap | 1.895 μs | 1.0082 μs | 0.0553 μs | 1.833 μs | 1.910 μs | 1.941 μs | 1.09 | 0.03 | 1 | 0.5283 | 0.0172 | 8.65 KB | 1.00 |
| AgileMapper | 2.553 μs | 0.2998 μs | 0.0164 μs | 2.536 μs | 2.555 μs | 2.568 μs | 1.46 | 0.02 | 2 | 0.5417 | 0.0153 | 8.91 KB | 1.03 |
🟠 Collection — 100-item List<T>
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 5.383 μs | 1.5208 μs | 0.0834 μs | 5.333 μs | 5.338 μs | 5.480 μs | 1.00 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| EggMapper | 5.914 μs | 1.0270 μs | 0.0563 μs | 5.851 μs | 5.930 μs | 5.960 μs | 1.10 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| AutoMapper | 6.684 μs | 1.4123 μs | 0.0774 μs | 6.628 μs | 6.652 μs | 6.772 μs | 1.24 | 0.02 | 1 | 1.7548 | 0.1068 | 28.7 KB | 1.05 |
| Mapster | 5.994 μs | 1.6485 μs | 0.0904 μs | 5.902 μs | 5.997 μs | 6.082 μs | 1.11 | 0.02 | 1 | 1.6708 | 0.0916 | 27.4 KB | 1.00 |
| MapperlyMap | 5.525 μs | 0.5847 μs | 0.0321 μs | 5.498 μs | 5.516 μs | 5.561 μs | 1.03 | 0.01 | 1 | 1.6785 | 0.0992 | 27.42 KB | 1.00 |
| AgileMapper | 5.363 μs | 0.5075 μs | 0.0278 μs | 5.332 μs | 5.370 μs | 5.386 μs | 1.00 | 0.01 | 1 | 1.0223 | 0.0610 | 16.72 KB | 0.61 |
🟠 Collection — 100-item List<T>
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Manual | 17.15 μs | 5.563 μs | 0.305 μs | 16.80 μs | 17.31 μs | 17.34 μs | 1.00 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| EggMapper | 17.29 μs | 3.727 μs | 0.204 μs | 17.05 μs | 17.40 μs | 17.40 μs | 1.01 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| AutoMapper | 22.71 μs | 7.976 μs | 0.437 μs | 22.21 μs | 22.89 μs | 23.02 μs | 1.32 | 0.03 | 1 | 5.7678 | 1.4343 | 94.34 KB | 1.10 |
| Mapster | 20.76 μs | 2.786 μs | 0.153 μs | 20.58 μs | 20.84 μs | 20.86 μs | 1.21 | 0.02 | 1 | 5.2490 | 1.3123 | 85.99 KB | 1.00 |
| MapperlyMap | 19.44 μs | 4.186 μs | 0.229 μs | 19.25 μs | 19.38 μs | 19.70 μs | 1.13 | 0.02 | 1 | 5.2490 | 1.2817 | 86.02 KB | 1.00 |
| AgileMapper | 22.27 μs | 9.246 μs | 0.507 μs | 21.70 μs | 22.43 μs | 22.68 μs | 1.30 | 0.03 | 1 | 5.2795 | 1.3123 | 86.25 KB | 1.00 |
⚪ Startup / Configuration time
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EggMapperStartup | 1,336.085 μs | 1,073.4712 μs | 58.8406 μs | 1,277.120 μs | 1,336.333 μs | 1,394.801 μs | 1.001 | 0.05 | 3 | 5.8594 | 3.9063 | 95.92 KB | 1.00 |
| AutoMapperStartup | 426.116 μs | 885.2332 μs | 48.5226 μs | 371.581 μs | 442.250 μs | 464.516 μs | 0.319 | 0.03 | 2 | 5.8594 | - | 104.24 KB | 1.09 |
| MapsterStartup | 2.680 μs | 0.4289 μs | 0.0235 μs | 2.654 μs | 2.685 μs | 2.700 μs | 0.002 | 0.00 | 1 | 0.7019 | 0.0267 | 11.51 KB | 0.12 |
EggMapper.Benchmarks.ColdStartBenchmark-report-github
| Method | Mean | Error | StdDev | Min | Median | Max | Ratio | RatioSD | Rank | Gen0 | Gen1 | Allocated | Alloc Ratio |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EggMapper | 1.348 ms | 1.421 ms | 0.0779 ms | 1.271 ms | 1.345 ms | 1.427 ms | 1.00 | 0.07 | 1 | 5.8594 | 3.9063 | 96.03 KB | 1.00 |
| AutoMapper | 4.060 ms | 9.531 ms | 0.5224 ms | 3.557 ms | 4.025 ms | 4.600 ms | 3.02 | 0.37 | 2 | 15.6250 | 7.8125 | 310.79 KB | 3.24 |
| Mapster | 4.113 ms | 12.487 ms | 0.6844 ms | 3.464 ms | 4.048 ms | 4.828 ms | 3.06 | 0.47 | 2 | 39.0625 | 15.6250 | 757.28 KB | 7.89 |
📝 Notes
- Each benchmark class is decorated with
[MemoryDiagnoser]and[RankColumn]. - The global config (see
src/EggMapper.Benchmarks/Program.cs) addsMin,Median, andMaxcolumns. - Manual is the hand-written baseline (ratio = 1.00). A ratio < 1 means faster than manual.
- Benchmarks run on GitHub-hosted runners — absolute times may vary between runs; focus on Ratio for comparisons.
- To reproduce locally:
cd src/EggMapper.Benchmarks dotnet run --configuration Release -- --filter '*'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AI coding agents (Claude, Copilot, Cursor) helping users with EggMapper don't know about:
ProjectTo<TSrc, TDest>(config)— wrong signature in docs (showed one type arg)Fix
Updated
llms.txtandllms-full.txtwith:ProjectTosignature with EF Core exampleTest plan
🤖 Generated with Claude Code