public void ThenTheAssetIsMarkedAsDeleted() { _sut.Delete(_asset.Id.Value); bool marked = new DatabaseHelper().IsAssetMarkedAsDeleted(_asset.Id.Value); Assert.IsTrue(marked); }
public IActionResult Delete([FromBody] int id) { if (id <= 0) { throw new ArgumentOutOfRangeException(nameof(id)); } _repository.Delete(id); return(Ok()); }
public static int Delete(int assetId) { if (assetId <= 0) { throw new ArgumentException("Asset Id must exceed 0."); } using (AssetRepository repo = new AssetRepository()) { return(repo.Delete(assetId)); } }
public void DeleteAsset(params Asset[] Assets) { /* Validation and error handling omitted */ _assetRepository.Delete(Assets); }