【发布时间】:2022-11-18 13:42:57
【问题描述】:
我的 EF Core BulkInsert 在插入超过 80 行时抛出错误,下面是插入 80 行数据的示例
Insert 80 rows
但是当我尝试 100 行时,错误如图所示 Error message
我使用 JSON 作为数据
function Save() {
var fail = {
title: 'Data insert fail',
message: 'refresh page to save again',
position: 'topRight'
};
console.log(_oSeismics);
if (_oSeismics.length > 0) {
var ajaxRequest = $.ajax({
url: "../PmepTempAdd/SavePmepVSP/",
type: "POST",
data: { data: _oSeismics },
dataType: "json",
beforeSend: function () {
},
});
ajaxRequest.done(function (data) {
swal('Success!', 'Successfully saved.', 'success');
});
ajaxRequest.fail(function (jqXHR, textStatus) {
iziToast.error(
fail
);
});
}
else {
iziToast.error(
fail
);
}
}
function NewSeismicObj() {
var now = new Date();
var date = now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate();
var time = now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
var dateTime = date + ' ' + time;
console.log(dateTime)
var oSeismic = {
No: "",
WellName: "",
SurveyVspYaTdk: "",
VspSonicCalibrationSynthetic: "",
VspReport: "",
VelocityWellCheckshot: "",
WellProgramProposal: "",
FinalWellReportEndOfWellReport: "",
ProcessingDataSgy: "",
RawDataSgy: "",
Recommendation: "",
RowCreated: dateTime
};console.log(dateTime)
return oSeismic;
}
知道这段代码有什么问题吗?为了 80行运行正常,超过80行报错如上
【问题讨论】:
标签: asp.net-mvc entity-framework-core ef-bulkinsert