Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RestSharpTable restSharpTable = db.RestSharpTables.Find(id);

            db.RestSharpTables.Remove(restSharpTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            RestSharpTable restSharpTable = await db.RestSharpTables.FindAsync(id);

            db.RestSharpTables.Remove(restSharpTable);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,TimeScraped,Symbol,LastPrice,Change,ChangePercent")] RestSharpTable restSharpTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(restSharpTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(restSharpTable));
 }
Ejemplo n.º 4
0
        public ActionResult Create([Bind(Include = "Id,TimeScraped,Symbol,LastPrice,Change,ChangePercent")] RestSharpTable restSharpTable)
        {
            if (ModelState.IsValid)
            {
                db.RestSharpTables.Add(restSharpTable);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(restSharpTable));
        }
        // GET: RestSharpTables/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RestSharpTable restSharpTable = await db.RestSharpTables.FindAsync(id);

            if (restSharpTable == null)
            {
                return(HttpNotFound());
            }
            return(View(restSharpTable));
        }
Ejemplo n.º 6
0
        // GET: RestSharpTables/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RestSharpTable restSharpTable = db.RestSharpTables.Find(id);

            if (restSharpTable == null)
            {
                return(HttpNotFound());
            }
            return(View(restSharpTable));
        }