mediator vs repository pattern