public JsonResult SaveGame(string gameId, string gameDateTime)
 {
     var gvm = new GameViewModel() {Id = int.Parse(gameId), GameDateTime = DateTime.Parse(gameDateTime)};
     _svc.SaveGame(gvm, User.Identity.Name);
     return Json("success");
 }
 public void SaveGame(GameViewModel gvm, string userId)
 {
     var game = _ctx.Games.Where(g => g.Id == gvm.Id).SingleOrDefault();
     game.GameDateTime = gvm.GameDateTime;
     game.UpdateBy = userId;
     game.UpdateDate = DateTime.Now;
     //
     _ctx.SaveChanges();
 }