public ActionResult Post([FromBody] ClienteDto clienteDto)
 {
     try
     {
         if (clienteDto == null)
         {
             return(NotFound());
         }
         _applicationSeviceCliente.Add(clienteDto);
         return(Ok("Cliente cadastrado com sucesso."));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #2
0
        public ActionResult Post([FromBody] ClienteDTO clienteDTO)
        {
            try
            {
                if (clienteDTO == null)
                {
                    return(NotFound());
                }

                applicationServiceCliente.Add(clienteDTO);
                return(Ok("Cliente Cadastrado com sucesso!"));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #3
0
        public ActionResult Post([FromBody] Cliente cliente)
        {
            try
            {
                if (cliente == null)
                {
                    return(NotFound());
                }

                _applicationServiceCliente.Add(cliente);
                return(Ok("Cliente cadastrado com sucesso!"));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }