public ActionResult Excluir(Guid Id) { APIHttpClient client = new APIHttpClient("http://localhost:52198/api/"); client.Delete<List<Planta>>("Planta/", Id); return RedirectToAction("Index", "Home"); }
public ActionResult TrashModerator(Guid id) { if (!isAuthenticated()) { return(Json(new { status = "error" })); } var response = clientHttp.Delete <List <User> >(@"User/", id); if ("200" == response.ToString()) { return(Json(new { status = "success", message_title = "Usuário excluida com sucesso" })); } return(Json(new { status = "error", message_title = "Erro ao excluir a usuário" })); }