Exemplo n.º 1
0
        public async Task Delete(Guid id)
        {
            var offer = await _repository.GetById(id);

            _repository.Delete(offer);
            await _repository.SaveChanges();
        }
        public void Delete(int id)
        {
            var offer = _offersRepository.GetById(id);

            if (offer == null)
            {
                throw new ArgumentNullException();
            }

            _offersRepository.Delete(offer);
            _offersRepository.SaveChanges();
        }
Exemplo n.º 3
0
 public void Delete(Offer offer)
 {
     _offersRepository.Delete(offer);
 }