摘要:
1 public static List<T> TableToListModel<T>(DataTable dt) where T : new() 2 { 3 List<T> res = new List<T>(); 4 // 获得此模型的类型 5 Type type = typeof(T); 6 阅读全文
posted @ 2022-05-10 16:47
进击的黑大帅
阅读(771)
评论(0)
推荐(0)
摘要:
在.NET CORE中,我们可以使用AutoMapper来实现对象数据传输也就是Dto。 1、需要安装如下两个包,通过Nuget安装即可: 1 AutoMapper 2 AutoMapper.Extensions.Microsoft.DependencyInjection 2、在Startup中添加 阅读全文
posted @ 2022-05-10 14:29
进击的黑大帅
阅读(85)
评论(0)
推荐(0)

浙公网安备 33010602011771号