Esempio n. 1
0
        /// <summary>
        /// Cascade Delete - Delete the Product and its Options
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task DeleteAsync(Guid id)
        {
            await _productOptionService.DeleteListAsync(id);

            var deleteResult = await _productRepository.DeleteAsync(id);

            if (deleteResult == 0)
            {
                throw new ProductNotFoundException(id);
            }
        }