public async Task <Entities.Tournament> AddTournament(Entities.Tournament tournament)
        {
            var isExists = await _tournamentContext.Tournament.AnyAsync(x => x.Name == tournament.Name);

            if (!isExists)
            {
                var result = await _tournamentContext.AddAsync(tournament);

                return(result.Entity);
            }
            else
            {
                throw new BusinessException("TOURNAMENT_ALREADY_EXISTS", "A tournament with the same name is already exists.", System.Net.HttpStatusCode.BadRequest);
            }
        }
 public Model.GenericPrediction FetchSinglePrediction(Entities.TeamPlayer teamPlayerA, Entities.TeamPlayer teamPlayerB, Entities.Tournament tournament, Model.IValueOptions valueOptions)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 3
0
 public void Update(Entities.Tournament entity)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 public Entities.Tournament Create(Entities.Tournament entity)
 {
     throw new NotImplementedException();
 }
 public void UpdateTournament(Entities.Tournament tournament)
 {
     _tournamentContext.Update(tournament);
 }