public ActionResult Join(JoinLeague league) { try { Guid leagueCode; league.IsSuccess = Guid.TryParse(league.JoinCode, out leagueCode); if (league.IsSuccess) { Guid leagueId = RDN.Library.Classes.League.LeagueFactory.GetLeagueAndJoinWithJoinCode(new Guid(league.JoinCode)); if (leagueId != new Guid()) { league.IsSuccess = true; MemberCache.ClearLeagueMembersCache(leagueId); MemberCache.ClearLeagueMembersApiCache(leagueId); } else league.IsSuccess = false; } else { league.Message = "Join code doesn't look accurate. Please make sure its the full code."; } } catch (Exception exception) { ErrorDatabaseManager.AddException(exception, exception.GetType()); } return View(league); }
public ActionResult Join() { JoinLeague league = new JoinLeague(); return View(league); }