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

Master Detail insert - Request Urgent Feedback #3207


User avatar
0
avanekar02 created

Hi

i have an array which is a shopcart with x number of items when the user checks out of the cart i want to insert the cart items into a table called basket and the totals of the shopcart items into a table called baskethdr.

i need all record to be inserted on rollbacked if fail. In examples shown in the step by step we are adding 1 by 1 item but that is not how i need. please can you assist me here.

my


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Even if you add records one by one, they all will be rolled back. Of course this is valid for UnitOfWork methods. If you do it in App Service or Controller, this will be done automatically.

    But if you want to insert batch records, this is another topic and ABP/AspNet Zero does not support it by default, you can use a third part tool for this.

    Thanks.

  • User Avatar
    0
    avanekar02 created

    which is the tool , also can you please explain what you mean by

    Even if you add records one by one, they all will be rolled back. Of course this is valid for UnitOfWork methods. If you do it in App Service or Controller, this will be done automatically.

    regards

    anwar

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @avanekar02,

    which is the tool , also can you please explain what you mean by

    Actually we don't offer any tool for batch database operations, you can search it by yourself.

    If you want to do it by ABP and AspNet Zero, you need to insert records one by one.

    Thanks.