public ActionResult DeleteConfirmed(int id)
        {
            MainKind mainKindModel = db.MainKindModels.Find(id);

            db.MainKindModels.Remove(mainKindModel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "MainKindID,MainKindName")] MainKind mainKindModel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mainKindModel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(mainKindModel));
 }
        public ActionResult Create([Bind(Include = "MainKindID,MainKindName")] MainKind mainKindModel)
        {
            if (ModelState.IsValid)
            {
                db.MainKindModels.Add(mainKindModel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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