public ActionResult Edit(AllyGradeView view)
 {
     if (ModelState.IsValid)
     {
         tbAllyGrade tballygrade = new tbAllyGrade();// ViewModelConvert.ConvertViewToModel(view);
         db.Entry(tballygrade).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(view));
 }
        //
        // GET: /AllyGrade/Edit/5

        public ActionResult Edit(int id = 0)
        {
            tbAllyGrade tballygrade = db.tbAllyGrade.Find(id);

            if (tballygrade == null)
            {
                return(HttpNotFound());
            }
            AllyGradeView model = new AllyGradeView();// ViewModelConvert.ConvertViewToModel(tballygrade);

            return(View(model));
        }
        public ActionResult Create(AllyGradeView view)
        {
            if (ModelState.IsValid)
            {
                tbAllyGrade tballygrade = new tbAllyGrade();// ViewModelConvert.ConvertViewToModel(view);
                tballygrade.Is_Delete = false;
                tballygrade.Is_Hide   = false;
                db.tbAllyGrade.Add(tballygrade);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View());
        }