I have 2 tables :
CREATE TABLE [dbo].[Accessoires1]
(
[ID] [int] IDENTITY(1,1) NOT NULL,
[Date] [datetime] NOT NULL,
[ClientID] [int] NOT NULL,
[TotalPrice] [varchar](50) NOT NULL
)
CREATE TABLE [dbo].[Accessoires2]
(
[Accessoire1_ID] [int],
[Date] [datetime] NOT NULL,
[ClientID] [int] NOT NULL,
[TotalPrice] [varchar](50) NOT NULL
)
Then I have a stored procedure Proc1
that insert values into table Accessoire1
, and I have Proc2
which adds data to accessoires2
- but it needs the a specific accessoire1_ID
In my C# code, I execute those procedures at the same exact time so I need the Accessoires1.ID
to be inserted into accessoires2
- how can I manage to do that?