Esempio n. 1
0
        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));
 }
Esempio n. 4
0
        public IActionResult DeletePrice(int Id)
        {
            _price.Delete(Id);

            return(RedirectToAction("Index"));
        }
Esempio n. 5
0
 public void DeleteForm(string keyValue)
 {
     service.Delete(t => t.priNO == keyValue);
 }
Esempio n. 6
0
 public Price Delete(int id)
 {
     return(_PriceRepository.Delete(id));
 }