public object Any(GetClientById request) { using (var db = DbFactory.OpenDbConnection()) { return(db.SingleById <Client>(request.Id)); } }
private void GetClientByIdHandler(GetClientById input) { // mixin DI Args and static args! var store = Context.ActorOf(ServiceProvider.For(Context.System).Props <ClientActorStore>("arg1", "arg2")); store.Forward(input); }
private async Task GetClientByIdHandler(GetClientById input) { var repository = _clientRepositoryFactory(); var result = await repository.GetById(input.Id); Sender.Tell(new ClientResult(result)); }