Confirm order problem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 anos atrás
Hello!
I check service this method public virtual PlaceOrderResult PlaceOrder(ProcessPaymentRequest processPaymentRequest)
in service OrderProcessingService and find out that entity Order created before OrderItem, but it was done not in transaction mode. So u can face to the situation that u trying to get some order data and it won't be full - so it not include all of orderItems. My question is why it's not done like this:


            var dbContext = EngineContext.Current.Resolve<IDbContext>() as DbContext;
            if (dbContext != null)
            {
                using (var transaction = dbContext.Database.BeginTransaction())
                {
                   ...........



6 anos atrás
Could you please give more details on the use case where you have this problem. If there are no items in the cart then application will throw 'Cart is empty' exception and order record is not created.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.