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(); } }
public async Task<ActionResult> Delete(Blog condemned) { await _shopify.GetResource<Blog>().Delete<Blog>(condemned); return RedirectToAction("Index"); }
public async Task<ActionResult> Edit(Blog data) { await _shopify.GetResource<Blog>().Update<Blog>(data); return RedirectToAction("Index"); }