public async Task <IApplicationResult <List <ClientMessage> > > GetAllAsync() { IDomainResult <List <Client> > domainResult = await ClientEntityService.GetAllAsync(); return(ResultMapper.MapFromDomainResult(domainResult, (domain) => ClientMapper.MapTo(domain))); }
public async Task <IApplicationResult <bool> > RegisterAsync(ClientMessage message) { IDomainResult <bool> domainResult = await ClientEntityService.RegisterAsync(ClientMapper.MapTo(message)); return(ResultMapper.MapFromDomainResult(domainResult, (domain) => domain)); }
public async Task <IApplicationResult <ClientMessage> > GetAsync(ClientSearchMessage message) { IDomainResult <Client> domainResult = await ClientEntityService.GetAsync(message.Cpf); return(ResultMapper.MapFromDomainResult(domainResult, (domain) => ClientMapper.MapTo(domain))); }