예제 #1
0
        public IActionResult Get(int id)
        {
            var results = _repository.ConsultarCliente(id);
            var model   = new ClienteModel
            {
                Nome = results.Rows[0]["Nome"].ToString(),

                Morada   = results.Rows[0]["Morada"].ToString(),
                Telefone = int.Parse(results.Rows[0]["Telefone"].ToString()),
                Email    = results.Rows[0]["Email"].ToString()
            };

            return(Ok(model));
        }