Exemplo n.º 1
0
        private void DeleteSizeOption(Item item)
        {
            var options     = CommonClientFunctions.ReadSizeOptionsByItemId(item.Id);
            var hasElements = CommonClientFunctions.EntitySelection(options, out SizeOption option, 1);

            if (!hasElements)
            {
                Console.WriteLine("No Size Options Available");
                return;
            }
            if (option is null)
            {
                return;
            }

            using (var db = new ShopContext())
            {
                new DataService(db).Delete(option);
            }
        }