我有类似异步等待致命错误3624
public async Task<SaveResult> SaveStatus(int quotationId, int quotationStatusTypeId)
{
using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
{
var offerQuotation = await RevisionManager.ReviseOffer(quotationId);
var offerQuotationStatusModel = DataUnit.GetCurrentOfferQuotationStatus(offerQuotation.quotationId);
scope.Complete();
}
}
public async Task<DTO.OfferQuotation> ReviseOffer(int quotationId)
{
//......
}
的方法有时这种方法GetCurrentOfferQuotationStatus
抛出一个异常:
错误而执行命令定义时出错。详情请参阅内部例外。
EXCEPTION已发生:System.Data.Entity.Core.EntityCommandExecutionException:执行命令定义时发生错误。详情请参阅内部例外。System.Data.SqlClient.SqlException:警告:致命错误3624发生在2016年12月6日7:05 PM。记下错误和时间,并联系您的系统管理员。
当前命令发生严重错误。如果有的话,结果应该被丢弃。
的方法GetCurrentOfferQuotationStatus
看起来像
public Model.OfferQuotationStatus GetCurrentOfferQuotationStatus(int? offerQuotationId)
{
return Context.OfferQuotationStatuses.Include(x => x.OfferQuotationStatusType).FirstOrDefault(x => x.IsActive && x.OfferQuotationId == offerQuotationId);
}
这是更多评论。 – mybirthname
@mybirthname:可能,但我认为这里的隐含问题是:“我的代码出了什么问题?”答案是:“可能没什么,你在其他地方有问题”。 – Richard
这不提供问题的答案。要批评或要求作者澄清,请在其帖子下方留言。 - [来自评论](/ review/low-quality-posts/14554789) –