任何人都可以帮助如何将字典映射到类。使用我的下面的代码,我在第.ConvertUsing
行收到错误,说“电话不明确......”
CreateMap<Dictionary<string,string>, CustomClass>()
.ConvertUsing(x =>
{
var serializer = new JavaScriptSerializer();
return serializer.Deserialize<CustomClass>(serializer.Serialize(x));
});
由于