Esempio n. 1
0
        //It's necessary to delete all RentItems before edit and save new ones
        public void EditRent(Rent Rent)
        {
            var items = _RentItemRepository.ReadAll().Where(i => i.RentId == Rent.Id);

            foreach (var item in items)
            {
                _RentItemRepository.Delete(item.Id);
            }

            _RentRepository.Update(Rent);
            this.Complete();
        }
Esempio n. 2
0
 public void Delete(Guid id)
 {
     _RentItemRepository.Delete(id);
 }