Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Async methods transient factory - still getting A second operation was started on this context instance before a previous operation completed [duplicate]

$
0
0

OrderItems and OrderTaxLines are ienumerables, to be displayed in grids. there is no, to my knowledge, awaitable functions to get them. I don't see what else could be the problem

protected override async Task OnParametersSetAsync(){    if (Order != null)    {        OrderItems = db.OrderItems.Include(o => o.Product).Include(o => o.productSubChoice).Where(c => c.Status != Status.Deleted && c.OrderID == Order.ID);        if (Order.OrderStatusID == InProgressStatusID)            await Order.UpdatePriceList(db);        await UpdateTaxesLines();        OrderSubTotal = OrderItems.Sum(i => i.TotalPrice);        OrderTotal = OrderSubTotal + OrderTaxLines.Sum(t => t.Value);    }}public async Task UpdateTaxesLines(){    OrderTaxLines = db.OrderTaxLines.Include(t => t.Tax).Where(c => c.Status != Status.Deleted && c.OrderID == Order.ID);}

enter image description here


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>