![](/img/trans.png)
[英]Mapping API result to class, should I use reflection and is this a case of DataAdapter design pattern?
這是我第一次使用 API,我不完全確定關於它的良好做法。 我正在使用第三方 API,它返回 C# 中的 class 'A',這與我的 DTO class 'MyA' 不太兼容。 我顯然必須 map 到我的實體,但我不知道最好的方法是什么。 我讀過數據適配器模式,據我了解,它的目的是充當兩個不兼容接 ...