public Task <Match> Create(NewMatch match) { // Match tempCreate = new Match(); // tempCreate.Winner = match.Winner; // tempCreate.MatchTurns = match.MatchTurns; // tempCreate.PlayerOneTeam = match.PlayerOneTeam; // tempCreate.PlayerTwoTeam = match.PlayerTwoTeam; Console.WriteLine(match.Winner); return(processor.Create(match)); }
public Task <Match> Create(NewMatch match) { Match temporary = new Match(); temporary.MatchId = Guid.NewGuid(); temporary.TimeAndDate = DateTime.Now; temporary.Winner = match.Winner; temporary.MatchTurns = match.MatchTurns; temporary.PlayerOneTeam = match.PlayerOneTeam; temporary.PlayerTwoTeam = match.PlayerTwoTeam; return(repository.CreateMatch(temporary)); }