Esempio n. 1
0
        public ActionResult ExcluirProjeto(int Id)
        {
            try
            {
                projetoRepository.Delete(Id);
            }
            catch
            {
                //TODO: Registrar a exceção em log
                Response.StatusCode = 500;
                return(Content("Não foi possível excluir o projeto por falha interna."));
            }

            return(Json(new { responseText = "Projeto excluído com sucesso." }, JsonRequestBehavior.AllowGet));
        }
 public async Task Delete(int id)
 {
     await _projetoRepository.Delete(id);
 }