public async Task <ActionResult> Delete(int id) { try { Snipplet s = _repo.Find <Snipplet>(id); _repo.Delete(s); await _repo.CommitAsync(); return(RedirectToAction("Index")); } catch (InvalidOperationException) { // noop } return(new HttpStatusCodeResult(HttpStatusCode.NotFound)); }
public void Remove(int id) { _rootFolderRepository.Delete(id); }