I have a question,My first request was normal, but the second time I made a mistake
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception: Unknown error 258
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__122_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteAsync(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.ExecuteAsync(DbContext _, ValueTuple
2 parameters, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func
4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(IReadOnlyList1 entriesToSave, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.DbContext.SaveChangesAsync(Boolean acceptAllChangesOnSuccess, CancellationToken cancellationToken) at Abp.EntityFrameworkCore.AbpDbContext.SaveChangesAsync(CancellationToken cancellationToken) at Abp.Zero.EntityFrameworkCore.AbpZeroCommonDbContext
3.SaveChangesAsync(CancellationToken cancellationToken)
at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesInDbContextAsync(DbContext dbContext)
at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.SaveChangesAsync()
at Abp.EntityFrameworkCore.Uow.EfCoreUnitOfWork.CompleteUowAsync()
at Abp.Domain.Uow.UnitOfWorkBase.CompleteAsync()
at Abp.Domain.Uow.UnitOfWorkInterceptor.<>c__DisplayClass6_0.<<PerformAsyncUow>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithPostActionAndFinally(Task actualReturnValue, Func1 postAction, Action
1 finalAction)
at Abp.Threading.InternalAsyncHelper.AwaitTaskWithFinally(Task actualReturnValue, Action`1 finalAction)
at GollumPay.Web.PayWeb.Controllers.OrderPayController.PayAction(PayApiRequest payApiRequest) in D:\Project\GollumPay\GollumPayTrunk_1.0\src\GollumPay.Web.PayWeb\Controllers\OrderPayController.cs:line 238
Method first executed by CreatePayOrderAsync,I don't know if it is the impact of CurrentUnitOfWork.SaveChanges();
4 Answer(s)
-
0
The first time you call the
CreatePayOrderAsync
method is successful. Then call theUpdatePayOrderAsync
method and pass the previous Id with an error, right?Please share the complete code of the
UpdatePayOrderAsync
method... -
0
the UpdatePayOrderAsync Method:
public async Task UpdatePayOrderAsync( UpdatePayOrderInput input ) { if (!input.Id.HasValue) return; var payOrder = await _payorderRepository.GetAsync( input.Id.Value ); if (input.ContainerId.HasValue) { payOrder.ContainerId = input.ContainerId; } if (input.PayPlanId.HasValue) { payOrder.PayPlanId = input.PayPlanId; } if (input.OrderPayPlanType.HasValue) { payOrder.OrderPayPlanType = input.OrderPayPlanType; } if (!input.OrderPayId.IsNullOrEmpty()) { payOrder.OrderPayId = input.OrderPayId; } if (!input.TransactionId.IsNullOrEmpty()) { payOrder.TransactionId = input.TransactionId; } if (input.IsVerify.HasValue) { payOrder.IsVerify = input.IsVerify.Value; } await _payorderRepository.UpdateAsync( payOrder ); //await CurrentUnitOfWork.SaveChangesAsync(); }
When I execute UpdatePayOrderAsync for the second time, I get an exception prompt.
-
0
hi ale1648604090 Can I take a look at it remotely? If you have qq, please contact me: 4456337
-
0
This issue is closed because it has not had recent activity for a long time.