重写数据库插入数据异常

This commit is contained in:
falcon 2022-04-19 09:45:50 +08:00
parent 8916196cf2
commit 48c6d1299c

View File

@ -46,7 +46,12 @@ namespace Falcon.SugarApi.DatabaseDefinitions
cn.CreateNew(createBy);
}
}
this.Insertable(data).ExecuteCommand();
try {
this.Insertable(data).ExecuteCommand();
}
catch (Exception ex) {
throw new Exception("SugarDbContext.Insert数据发生异常", ex);
}
}
/// <summary>