Example #1
0
        private async Task DeleteDetail(Guid id)
        {
            var Order = await _orderRepository.GetAsync(id);

            foreach (var receiptDetail in Order.OrderItems)
            {
                await _orderItemRepository.DeleteAsync(receiptDetail.Id, true);
            }
        }
        public override async Task DeleteAsync(Order entity)
        {
            var orderItems = await _orderItemRepository.GetAllByOrderIdAsync(entity.Id);

            foreach (var orderItem in orderItems)
            {
                await _orderItemRepository.DeleteAsync(orderItem);
            }
            await base.DeleteAsync(entity);
        }
Example #3
0
 public async Task DeleteOrderItemAsync(int Id)
 {
     await _orderItemRepository.DeleteAsync(Id);
 }