public async Task <ActionResult> Create(TypeRest typeRest) { context.TypeRests.Add(typeRest); await context.SaveChangesAsync(); return(RedirectToAction("Index")); }
public int Update(String id_trest, String trest_name) { TypeRest edit = new TypeRest { id_trest = id_trest, trest_name = trest_name }; return(tr.Update(edit)); }
public int Insert(String id_trest, String trest_name) { TypeRest nuevo = new TypeRest { id_trest = id_trest, trest_name = trest_name }; return(tr.Insert(nuevo)); }
public ActionResult ConfirmDelete(int id) { TypeRest typerest = context.TypeRests.Find(id); if (typerest == null) { return(View("NotFound")); } else { return(View(typerest)); } }
public ActionResult Edit(int?id) { TypeRest service = context.TypeRests.Find(id); return(View(service)); }