Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

delete function that delete all order details of a single Order ? #8034


User avatar
0
troyfernando created

Do you have a delete function that delete all order details of a single Order without the need for looping each record.


4 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, can you share the ANZ version and framework?

    are you using ef core/ ef 6?

    also, please share the definitions of order details.

  • User Avatar
    0
    troyfernando created

    HI, this is my ANZ version / framework ASP.NET CORE & Angular (single solution) .NET Core 2.2 v7.2.3

    my sample for order details is a shopping cart with many item that i want to empty or delete using if any single delete command, without looping each record for deletion

  • User Avatar
    0
    ryancyq created
    Support Team

    Since order and order details are custom businless domain implmeneted on your end, you can try using Repostory Delete method.

    _cartLineItemsRepository.Delete(() => cli.Order_Id == yourOrderId)
    // other order details deletion
    
  • User Avatar
    0
    troyfernando created

    ok thanks