public ActionResult DeleteConfirmed(int id)
        {
            CsteY4_T2_Students csteY4_T2_Students = db.Cstey4t2studens.Find(id);

            db.Cstey4t2studens.Remove(csteY4_T2_Students);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "ID,StudentId,StudentName,SubjectCode")] CsteY4_T2_Students csteY4_T2_Students)
 {
     if (ModelState.IsValid)
     {
         db.Entry(csteY4_T2_Students).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(csteY4_T2_Students));
 }
        public ActionResult Create([Bind(Include = "ID,StudentId,StudentName,SubjectCode")] CsteY4_T2_Students csteY4_T2_Students)
        {
            if (ModelState.IsValid)
            {
                db.Cstey4t2studens.Add(csteY4_T2_Students);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(csteY4_T2_Students));
        }
        // GET: CsteY4_T2_Students/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            CsteY4_T2_Students csteY4_T2_Students = db.Cstey4t2studens.Find(id);

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