Hi,
What's the best way to accomplish the following using the adapter?
declare @person_id int
set @person_id = 2
declare @code_identifier varchar( 8 )
set @code_identifier = '12345678'
insert into sweepstakes ( person_id, sweestakes_code_id )
select @person_id, sweepstakes_code_id
from sweepstakes_code
where code_identifier = @code_identifier
I can use a SweepstakesCodeEntity instance to get the sweepstakes_code_id based on the @code_identifier value, and then just issue an adapter.SaveEntity( sweepstakes ) after setting the PersonId and SweepstakesCodeId properties of the sweepstakes object, but was wondering if there was a more direct way?
The relationship between the two tables is:
sweepstakes.sweepstakes_code_id = sweepstakes_code.sweepstakes_code_id
Thanks!