public virtual async Task <MatchInstance> GetCurrentMatchInstance() { MatchInstance matchInstance = null; var matchIntanceId = Request.Cookies["matchInstanceId"]; if (!string.IsNullOrEmpty(matchIntanceId)) { matchInstance = await MatchInstanceRepository.GetAll().Include(o => o.Match).Where(o => o.Id == int.Parse(matchIntanceId)).SingleOrDefaultAsync(); } return(matchInstance); }