private static object MapToGridModel(ACCT_TAB_JIRKA o)
 {
     return
         new
         {
             o.ABAL,
             o.AACCT,
             o.AWDL_START
         };
 }
        public ActionResult Create(AcctTabJirkaInput input)
        {
            if (!ModelState.IsValid) return PartialView(input);

            var acctTabJirka = new ACCT_TAB_JIRKA
            {
                ABAL = input.ABAL,
                AACCT = input.AACCT,
                AWDL_START = input.AWDL_START
            };
            db.ACCT_TAB_JIRKA.Add(acctTabJirka);
            db.SaveChanges();

            return Json(MapToGridModel(acctTabJirka)); // returning grid model, used in grid.api.renderRow
        }
 public ActionResult Delete(DeleteAcctTabJirkaConfirmInput input)
 {
     var acctTabJirka = new ACCT_TAB_JIRKA { AACCT = input.AACCT };            
     db.Entry(acctTabJirka).State = EntityState.Deleted;
     db.SaveChanges();
     return Json(new { input.AACCT });
 }