public IActionResult Delete(int id) { var autor = _autorRepository.FiltraPorId(id); _autorRepository.Delete(autor); return(RedirectToAction("List")); }
public IHttpActionResult Delete(int idAutor) { if (idAutor.Equals(null)) { return(BadRequest("Informe o ID do autor")); } _autorRepository.Delete(idAutor); return(Ok()); }
public void DeleteAutor(Guid id) { if (id == null) { throw new Exception("Autor nao definido"); } var autor = _repository.ReadAll().FirstOrDefault(item => item.Id == id); _repository.Delete(autor); }
public ActionResult DeleteConfirm(int id) { repository.Delete(id); return(RedirectToAction("Index")); }
public void Delete(int id) { _autorRepository.Delete(id); }
public void RemoverAutor(Autor autor) { _autorRepository.Delete(autor); }
public async Task Delete(int id) { await _repository.Delete(id); }
public void Delete(Autor autor) { _autorRepository.Delete(autor); }