public void Handle(UpdateGameDateCommand command)
 {
     // TODO validate
     using (var dbContext = new LeagueDataContext())
     {
         Game game = dbContext.Games.GetGameById(command.GameId);
         command.Date = command.Date.AddHours(command.Time.Hours);
         command.Date = command.Date.AddMinutes(command.Time.Minutes);
         game.Date    = command.Date;
         dbContext.SaveChanges();
     }
 }
        public ActionResult UpdateGameDate(UpdateGameDateCommand command)
        {
            HandleCommand(command, Json("Termin meczu został zaktualizowany"));

            return RedirectToAction("EditCalendar");
        }
Example #3
0
        public ActionResult UpdateGameDate(UpdateGameDateCommand command)
        {
            HandleCommand(command, Json("Termin meczu został zaktualizowany"));

            return(RedirectToAction("EditCalendar"));
        }