批量添加报Parameter count mismatch. 返回
代码如下,
public bool InsertBatch<T>(List<T> insertObjs) where T : class
{
bool result;
try
{
using (SqlSugarClient instance = GetInstance())
{
result = instance.Insertable(insertObjs).ExecuteCommand() > 0;
}
}
catch (Exception ex)
{
throw ex;
}
return result;
}
热忱回答(3)
-
Αφροδ?τη VIP0
2020/9/18返回新增状态的话用ExecuteCommandIdentityIntoEntity
result = instance.Insertable(insertObjs).ExecuteCommandIdentityIntoEntity();
0 回复 -
fate stay night VIP0
2020/9/20这个错需要具体例子
0 回复 -
左手忘记右手 VIP0
2022/5/16实体缺少无参数的构造函数
0 回复