
[英]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 到我的实体,但我不知道最好的方法是什么。 我读过数据适配器模式,据我了解,它的目的是充当两个不兼容接 ...