private async void ClearItems(object obj) { foreach (var item in Items) { await _itemsService.DeleteItem(item); } await GetItemCollection(); }
public ActionResult <string> DeleteItem(int id) { try { return(Ok(_is.DeleteItem(id))); } catch (System.Exception error) { return(BadRequest(error.Message)); } }