I am trying to figure out how to tackle this problem. I have to insert some data into 2 tables lets call them Table A and Table B.
Table A has these columns
The guard clause (param1 != "hi") should be in a higher layer, such as an application service layer.
The service layer should coordinate the two repositories.