public ActionResult Create(TigersGoatsGame tigersGoatsGame) { if (ModelState.IsValid) { tigersGoatsGame.user1 = User.Identity.Name; tigersGoatsGame.stateString = "GTXXXTXXXXXXXXXXXXXXXTXXXT020"; context.TigersGoatsGames.Add(tigersGoatsGame); context.SaveChanges(); return RedirectToAction("Index"); } return View(tigersGoatsGame); }
public ActionResult Edit(TigersGoatsGame tigersGoatsGame) { if (ModelState.IsValid) { context.Entry(tigersGoatsGame).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(tigersGoatsGame); }