Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Behaviour of `IMapper.Map(src, dst)` differs from AutoMapper

オープン
#1,005 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
csharp
領域
backend

調査の方向性

IMapper.Map(src, dst) のエントリーポイントから開始し、Mapster の動作を issue 内の AutoMapper の例と比較してください。destination オブジェクトがどのように扱われるかを追跡し、その後、返された値と元の destination の両方にマッピングされた値が含まれていることを、できれば回帰テストで検証してください。

索引モデルが issue の本文から書いたものです。

説明

I discovered a difference between AutoMapper's and Mapster's implementation of the IMapper interface. Even though it could be argued that the AutoMapper behavior is unintuitive, I believe that for compatibility, Mapster should update the values of the destination object too.

AutoMapper

var output = mapper.Map(from, to);
// output and to contain the mapped values

Mapster

var output = mapper.Map(from, to);
// only output contains the mapped values

Risk
The risk that this issue poses is that usages like here do not map the value after switching to the Mapster implementation of IMapper

主要言語
C#
スター
5.2k
フォーク
409
平均マージ
3日 4時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MapsterMapper/Mapster のほかの issue

MapsterMapper/Mapster の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。