public ActionResult DeleteItem(int id) { var itemModelFromRepo = _item.GetItemById(id); if (itemModelFromRepo == null) { return(NotFound()); } _item.DeleteItem(itemModelFromRepo); _item.SaveChanges(); return(NoContent()); }
public void RemoveItem(int itemId) { InitNonExistingRepo(); ItemRepo.DeleteItem(itemId); UowManager.Save(); }
public async Task <bool> Delete(string itemId) { return(await itemRepo.DeleteItem(itemId)); }