Ejemplo n.º 1
0
        public ActionResult Post([FromBody] ClientDto clientDto)
        {
            try
            {
                if (clientDto == null)
                {
                    return(NotFound());
                }

                applicationServiceClient.Add(clientDto);
                return(Created("", applicationServiceClient.GetAll()));
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
        public ActionResult Post([FromBody] ClientDTO clienteDTO)
        {
            try
            {
                if (clienteDTO == null)
                {
                    return(NotFound());
                }

                _applicationServiceClient.Add(clienteDTO);
                return(Ok("Cliente Cadastrado com sucesso!"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Post([FromBody] ClientDto model)
        {
            var result = await _service.Add(model);

            return(Ok(result));
        }