//private methods to invoke the relavant event private async Task InvokeGetAllBeerCommandAsync(IContext context, GetAllBeerCommand command) { var triggeredEvent = new GetAllBeerEvent(); var result = await actorManager.RequestAsync <BeerEventActor, List <Beer> >(triggeredEvent); context.Respond(result); }
//private methods to invoke the relavant event private async Task InvokeGetAllBeerEventAsync(IContext context, GetAllBeerEvent e) { var(IsSuccess, Result) = await dataAccessService.QueryAsync <Beer>("select * from beer"); if (IsSuccess) { context.Respond(Result); } }