Esempio n. 1
0
        public static int InsertProduct(
            string productName,
            string productNumber,
            decimal productPrice,
            string productImage,
            string productDescription,
            string productImageBox,
            string productImageOOBox
            )
        {
            var prod = new Product()
            {
                ProductName = productName,
                ProductNumber = productNumber,
                ProductPrice = productPrice,
                ProductImage = productImage,
                ProductDescription = productDescription,
                ProductImageBox = productImageBox,
                ProductImageOOBox = productImageOOBox
            };

            db.Products.InsertOnSubmit(prod);
            db.SubmitChanges();
            return 1;
        }
 partial void UpdateProduct(Product instance);
 partial void DeleteProduct(Product instance);
 partial void InsertProduct(Product instance);