http://api.shopify.com/blog.html http://wiki.shopify.com/Blog_%28API%29
Наследование: ShopifyResourceModel, IFullMutable
Пример #1
0
        public async Task<ActionResult> Create(FormCollection collection)
        {
            try
            {
                var newBlog = new Blog()
                {
                    Title = collection["Title"]
                };

                await _shopify.GetResource<Blog>().Save<Blog>(newBlog);

                return RedirectToAction("Index");
            }
            catch (Exception)
            {
                // handle the exception
                return View();
            }
        }
Пример #2
0
        public async Task<ActionResult> Delete(Blog condemned)
        {
            await _shopify.GetResource<Blog>().Delete<Blog>(condemned);

            return RedirectToAction("Index");
        }
Пример #3
0
        public async Task<ActionResult> Edit(Blog data)
        {
                await _shopify.GetResource<Blog>().Update<Blog>(data);

                return RedirectToAction("Index");
        }