public async Task <ActionResult <IEnumerable <PartOfCollectionItem> > > DeleteItem(ObjectId id) { await partOfCollectionItemRepository.DeleteItemParts(id); await collectionItemRepository.Delete(id); return(Ok()); }
public IActionResult Delete(int id) { var todelete = _repository.Get(id); if (todelete != null) { _repository.Delete(todelete); return(Helper.CheckResult(todelete, true)); } return(NotFound()); }