Ejemplo n.º 1
0
        public async Task <dynamic> RemoveAsync(Guid id)
        {
            var listOrderDetail = await _orderDetailRepository.GetInOrderAsync(id);

            foreach (var item in listOrderDetail)
            {
                await _orderDetailRepository.RemoveAsync(item);
            }
            var data = await _orderRepository.GetByIdAsync(id);

            var succeeded = await _orderRepository.RemoveAsync(data);

            return(new { succeeded });
        }