Ejemplo n.º 1
0
 public bool Delete(int id)
 {
     try
     {
         if (Global.TpConexao == Enumeradores.TipoConexao.LAN)
         {
             return(regrasnegocio.Delete(id));
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         throw;
     }
 }
        public IActionResult Delete(int id)
        {
            ClienteBO    clienteBO;
            ObjectResult response;

            try
            {
                _log.LogInformation($"Starting Delete( {id} )");

                clienteBO = new ClienteBO(_loggerFactory, _config);
                clienteBO.Delete(id);

                response = Ok(string.Empty);

                _log.LogInformation($"Finishing Delete( {id} )");
            }
            catch (Exception ex)
            {
                _log.LogError(ex.Message);
                response = StatusCode(500, ex.Message);
            }

            return(response);
        }