public IActionResult Delete(int listId, int id) { if (listId != _listItemServices.Owner(id)) { return(BadRequest()); } return(Ok(_listItemServices.Delete(id))); }
private void DeleteModelItems(ListModel model) { model?.Items.ForEach(li => _listItemServices.Delete(li.Id)); }