Пример #1
0
        public bool AddItemShoppingCart(ItemDetailsModel item)
        {
            Repository.ShoppingDbEntities db = new Repository.ShoppingDbEntities();
            var newItem = db.ItemDetails.Create();
            newItem.Image_Name = item.Image_Name;
            newItem.Item_Id = item.Item_Id;
            newItem.Item_Name = item.Item_Name;
            newItem.Item_Price = item.Item_Price;

            db.ItemDetails.Add(newItem);
            db.SaveChanges();

            return true;
        }
Пример #2
0
        public bool AddItemShoppingCart(ItemDetailsModel item)
        {
            Repository.ShoppingDbEntities db = new Repository.ShoppingDbEntities();
            var newItem = db.ItemDetails.Create();

            newItem.Image_Name = item.Image_Name;
            newItem.Item_Id    = item.Item_Id;
            newItem.Item_Name  = item.Item_Name;
            newItem.Item_Price = item.Item_Price;

            db.ItemDetails.Add(newItem);
            db.SaveChanges();

            return(true);
        }