http://api.shopify.com/blog.html http://wiki.shopify.com/Blog_%28API%29
Inheritance: ShopifyResourceModel, IFullMutable
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 2
0
        public async Task<ActionResult> Delete(Blog condemned)
        {
            await _shopify.GetResource<Blog>().Delete<Blog>(condemned);

            return RedirectToAction("Index");
        }
Ejemplo n.º 3
0
        public async Task<ActionResult> Edit(Blog data)
        {
                await _shopify.GetResource<Blog>().Update<Blog>(data);

                return RedirectToAction("Index");
        }