public async Task <ActionResult <bool> > Delete(int id) { repository = new ItemsRepository(_context); var result = await repository.DeleteItem(id); return(Ok(result)); }
internal string DeleteItem(int id) { if (_repo.DeleteItem(id)) { return("The item has been deleted"); } return("The item could not be deleted"); }
public async Task <JsonResult> DelItem(string itemId) { var result = await repoItems.DeleteItem(itemId); return(Json(new { isOk = result })); }
private void button3_Click(object sender, EventArgs e) { repository.DeleteItem(Item.Id); MessageBox.Show("Istrinta"); }