예제 #1
0
        public async Task <ActionResult <bool> > Delete(int id)
        {
            repository = new ItemsRepository(_context);
            var result = await repository.DeleteItem(id);

            return(Ok(result));
        }
예제 #2
0
 internal string DeleteItem(int id)
 {
     if (_repo.DeleteItem(id))
     {
         return("The item has been deleted");
     }
     return("The item could not be deleted");
 }
예제 #3
0
        public async Task <JsonResult> DelItem(string itemId)
        {
            var result = await repoItems.DeleteItem(itemId);

            return(Json(new { isOk = result }));
        }
예제 #4
0
 private void button3_Click(object sender, EventArgs e)
 {
     repository.DeleteItem(Item.Id);
     MessageBox.Show("Istrinta");
 }