public async Task Delete(Guid userId, Guid id) { var price = await _priceRepository.Delete(userId, id); if (price == null) { throw new KeyNotFoundException($"Price with id: {id} not found."); } await _priceRepository.CommitAsync(); }
public async Task <IActionResult> DeletePrice(PriceCreationDto dto) { try { await _priceRepository.Delete(dto); return(Ok()); } catch (Exception e) { return(NotFound("This Price cannot be delete")); } }
public int Delete(int id) { return(_customRepository.Delete(id)); }
public IActionResult DeletePrice(int Id) { _price.Delete(Id); return(RedirectToAction("Index")); }
public void DeleteForm(string keyValue) { service.Delete(t => t.priNO == keyValue); }
public Price Delete(int id) { return(_PriceRepository.Delete(id)); }