Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            MYTABLE mYTABLE = db.MYTABLEs.Find(id);

            db.MYTABLEs.Remove(mYTABLE);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Username,Title,Band,Length")] MYTABLE mYTABLE)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mYTABLE).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(mYTABLE));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Username,Title,Band,Length")] MYTABLE mYTABLE)
        {
            if (ModelState.IsValid)
            {
                db.MYTABLEs.Add(mYTABLE);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(mYTABLE));
        }
Esempio n. 4
0
        // GET: MYTABLEs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MYTABLE mYTABLE = db.MYTABLEs.Find(id);

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