public Match()
 {
     Players = new List<MatchPlayer>();
     Games = new List<MatchGame>();
     Comments = new List<MatchComment>();
     ScoreType = MatchOutcome.NotYetPlayed;
     Score = new MatchScore();
 }
 public Match()
 {
     Players   = new List <MatchPlayer>();
     Games     = new List <MatchGame>();
     Comments  = new List <MatchComment>();
     ScoreType = MatchOutcome.NotYetPlayed;
     Score     = new MatchScore();
 }
        public Match UpdateScore(int matchId, MatchScore score)
        {
            using (var dbContext = new TtcDbContext())
            {
                var match = dbContext.Matches
                    .WithIncludes()
                    .Single(x => x.Id == matchId);

                match.AwayScore = score.Out;
                match.HomeScore = score.Home;
                dbContext.SaveChanges();

                return GetMatch(dbContext, match.Id);
            }
        }