A candidate largely funded by an AIPAC political action committee has won the Democratic primary for US Congress in Maryland.