修复一个clone时类型转换错误
This commit is contained in:
parent
760b5b9b43
commit
8916196cf2
|
@ -22,7 +22,7 @@ namespace Falcon.SugarApi
|
||||||
join t in target.GetType().GetProperties() on s.Name equals t.Name
|
join t in target.GetType().GetProperties() on s.Name equals t.Name
|
||||||
select new { s, t };
|
select new { s, t };
|
||||||
foreach (var item in all) {
|
foreach (var item in all) {
|
||||||
item.t.SetValue(target, Convert.ChangeType(item.s.GetValue(source), item.s.PropertyType));
|
item.t.SetValue(target, Convert.ChangeType(item.s.GetValue(source), item.t.PropertyType));
|
||||||
}
|
}
|
||||||
return source;
|
return source;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user