Пример #1
0
        public void Call()
        {
            ProductOptionsQuery query = new ProductOptionsQuery();

            foreach (ProductOption option in query.GetAll(Product.Id))
            {
                new DeleteProductOption(option).Call();
            }

            using (SqlCommand command = new SqlCommand())
            {
                command.CommandText = "delete from product where id = '@id'";
                command.Parameters.AddWithValue("@id", Product.Id);

                new RunQuery(command).Execute();
            }
        }
Пример #2
0
        public IEnumerable <ProductOption> GetOptions(Guid productId)
        {
            ProductOptionsQuery query = new ProductOptionsQuery();

            return(query.GetAll(productId));
        }