public ActionResult Delete(SettingsModel model) { var queryToDelete = storageClient.CreateQuery().ToList().Single(q => q.RowKey == model.RowKey); storageClient.Delete(queryToDelete); storageClient.SaveChanges(); return RedirectToAction("Index"); }
// // GET: /Settings/ public ActionResult Index() { var queries = storageClient.CreateQuery().Where(q => q.PartitionKey == partitionKey).ToList(); var model = new SettingsModel() { Queries = queries, }; return View(model); }
public ActionResult Index(SettingsModel model) { storageClient.Insert(new UserQuery() { Name = model.Name, Accounts = model.Accounts, Hashtags = model.HashTags, PartitionKey = partitionKey, RowKey = Guid.NewGuid().ToString(), }); storageClient.SaveChanges(); return RedirectToAction("Index"); }
public ActionResult Edit(string id) { var model = new SettingsModel(); return View(model); }