'How can i insert multiple record with subtable multiple record?

I have three tables:

  • Table1(id, name, no)
  • Table2(id, table1id, no)
  • Table3(id, table2id, no).

I have an object suitable for the structure of these tables and I want to save them in the database. While recording, I want to use the sequence of the first table in my second table. I will pull the sequence of my first table from the database. I will save tables 2 and 3 in the same way. I want to save these transactions in my oracle database using sqlkata, dapper in .net environment.

I tried pulling the sequence value and setting it each time.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source