Exemplo n.º 1
0
 public ActionResult Excluir([FromHeader] string ibge, [FromRoute] int id)
 {
     try
     {
         ibge = _config.GetConnectionString(Connection.GetConnection(ibge));
         _repository.Delete(ibge, id);
         return(Ok());
     }
     catch (Exception ex)
     {
         var response = TrataErro.GetResponse(ex.Message, true);
         return(StatusCode((int)HttpStatusCode.InternalServerError, response));
     }
 }
Exemplo n.º 2
0
 public IActionResult DeleteConfirmed(int?id)
 {
     _contextDAO.Delete(id);
     return(RedirectToAction("Index"));
 }
Exemplo n.º 3
0
 public ERetornoEstabelecimento Delete(long id)
 {
     return(_estabelecimentoRepository.Delete(id) ? ERetornoEstabelecimento.SucessoDelete : ERetornoEstabelecimento.ErroDesconhecido);
 }