TesteResponse IEvolutionService.ObterTeste(DescricaoDapperGet descricaoDapperGet) { var testeEntitie = _evolutionDapperRepository.ObterTeste(descricaoDapperGet.Descricao); if (testeEntitie == null) { var validation = _validationFactory.CreateValidationResult(); validation.AddValidationError("TesteNaoEncontrado", "Teste não enontrado."); throw new CoreException(validation); } TesteResponse testeResponse = new TesteResponse() { Codigo = testeEntitie.Codigo, DataCadastro = testeEntitie.DataCadastro, Descricao = testeEntitie.Descricao }; return(testeResponse); }
public ActionResult <TesteResponse> Get(TesteRequest testeRequest) { TesteResponse testeResponse = testeAppServico.TesteDoAppServico(testeRequest); return(Ok(testeResponse)); }