Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

How to deal with create ID and add to database at once issue

$
0
0

I have a need for a boss to create a database entry (So ID is created) but at the same time save this ID and his keyed in field values into the database.

Of course this is ok when all are saved to single table but this also means this is not normalized.

What I wish is when he typed all data and push go button,

First SetID and his create time and ID is saved to Set Table A, and then his entered values in other field is saved to DataTableB with SetID from Table A.

I am able to create new row in Table A, and I am able to save other values to DataTableB, but I am not able to save the SetID from TableA into the TableB in this same entry when adding data row to TableB.

Please help. How would you solve this problem ?

Thanks


Viewing all articles
Browse latest Browse all 1698

Trending Articles



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