public HttpResponseMessage GetByCpf(long cpf) { try { var client = _repo.GetByCpf(cpf); return(Request.CreateResponse(HttpStatusCode.OK, client)); } catch (InvalidOperationException) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } catch { return(Request.CreateResponse(HttpStatusCode.InternalServerError)); } }