public int CreateMatch(List <Round> rounds, Lane lane, Party winner = null) { var match = new Match { Rounds = rounds, Lane = lane }; if (winner != null) { match.Winner = winner; match.WinnerId = winner.Id; } _context.Matches.Add(match); _context.SaveChanges(); return(match.Id); }
//Match management public int CreateMatch(List <Round> rounds, Lane lane, Party winner = null) { return(_repository.CreateMatch(rounds, lane, winner)); }