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"); }
public ActionResult UpdateGameDate(UpdateGameDateCommand command) { HandleCommand(command, Json("Termin meczu został zaktualizowany")); return(RedirectToAction("EditCalendar")); }