public IHttpActionResult Delete(int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } service.Delete(id); return(Ok()); }
public void Delete(Guid Id) { service.Delete(Id); }
public IActionResult DeleteConfirmed(int id) { _cidadeService.Delete(id); _cidadeService.SaveChanges(); return(RedirectToAction(nameof(Index))); }