批量插入如何插入指定列? 返回
SqlSugar
老数据
5
2270
悬赏:5 飞吻
批量插入或更新时,如果插入指定的列?
热忱回答(5)
-
fate stay night VIP0
2018/11/20.InsertColumns(it =>new{ it.Name, it.SchoolId })0 回复 -
①笙铕┊祢 VIP0
2018/11/20@fate stay night:你好,批量插入Insertable是个List,并不能访问到实体的属性。
Db.Insertable< HouseRecoveryDetail>(data.Details).InsertColumns(it => ???这里如何指定??)
0 回复 -
fate stay night VIP0
2018/11/20不试试肿么知道呢
0 回复 -
①笙铕┊祢 VIP0
2018/11/22@fate stay night:it点出来的是List类型数据对应的方法,求大神指导
0 回复 -
fate stay night VIP0
2018/11/22大哥啊你动手了没有?
var t10 = db.Insertable(insertObjs.ToList()).InsertColumns(it => new { it.Name }).ExecuteCommand(); 我怎么点的出来的???
0 回复