public void AddProducts(ProductMinInfo product)
        {
            Products p1 = new Products();

            p1.Description = product.Description;
            p1.ItemName    = product.ItemName;
            p1.Price       = product.Price;
            _et.Products.Add(p1);
            _et.SaveChanges();
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            EthnicDbEntities  context = new EthnicDbEntities();
            ProductCategories pc      = new ProductCategories()
            {
                ProductCatId = 1, CategoryName = "Jewelry"
            };

            context.ProductCategories.Add(pc);
            context.SaveChanges();
        }