Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Albam_OneTowMany albam_OneTowMany = db.OneTowMany_tbl_Albams.Find(id);

            db.OneTowMany_tbl_Albams.Remove(albam_OneTowMany);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Albam_OneTowManyID,Title,ArtistID")] Albam_OneTowMany albam_OneTowMany)
 {
     if (ModelState.IsValid)
     {
         db.Entry(albam_OneTowMany).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(albam_OneTowMany));
 }
Exemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Albam_OneTowManyID,Title,ArtistID")] Albam_OneTowMany albam_OneTowMany)
        {
            if (ModelState.IsValid)
            {
                db.OneTowMany_tbl_Albams.Add(albam_OneTowMany);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(albam_OneTowMany));
        }
Exemplo n.º 4
0
        // GET: Albam_OneTowMany/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Albam_OneTowMany albam_OneTowMany = db.OneTowMany_tbl_Albams.Find(id);

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