Example #1
0
 public ActionResult Delete(SettingsModel model)
 {
     var queryToDelete = storageClient.CreateQuery().ToList().Single(q => q.RowKey == model.RowKey);
     storageClient.Delete(queryToDelete);
     storageClient.SaveChanges();
     return RedirectToAction("Index");
 }
Example #2
0
        //
        // GET: /Settings/
        public ActionResult Index()
        {
            var queries = storageClient.CreateQuery().Where(q => q.PartitionKey == partitionKey).ToList();
            var model = new SettingsModel()
            {
                Queries = queries,
            };

            return View(model);
        }
Example #3
0
        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");
        }
Example #4
0
        public ActionResult Edit(string id)
        {
            var model = new SettingsModel();

            return View(model);
        }