public async Task <IActionResult> DeleteConfirmed(int id) { var product = await OperationsPro.FindAsync(m => m.Id == id); OperationsPro.Delete(product); return(RedirectToAction(nameof(Index))); }
public ActionResult Delete(Book book) { try { books.Delete(book); return(RedirectToAction(nameof(List))); } catch { return(View()); } }
public IActionResult DeleteConfirmed(int id) { _operations.Delete(_configuration.GetConnectionString("ConnectionString"), id); return(RedirectToAction(nameof(Index))); }
/// <summary> /// Removes the specified key. A key is ignored if it does not exist. /// </summary> /// <param name="key">The key of the object.</param> /// <returns></returns> public bool Delete(string key) { return(_operations.Delete(key)); }