public async Task<ActionResult> Create(FormCollection collection) { try { var newProduct = new Product() { Title = collection["Title"] }; await _shopify.GetResource<Product>().Save<Product>(newProduct); return RedirectToAction("Index"); } catch (Exception) { // handle the exception return View(); } }
public async Task<ActionResult> Delete(Product condemned) { await _shopify.GetResource<Product>().Delete<Product>(condemned); return RedirectToAction("Index"); }
public async Task<ActionResult> Edit(Product data) { await _shopify.GetResource<Product>().Update<Product>(data); return RedirectToAction("Index"); }