Exemplo n.º 1
0
        private Model.Race ConvertDtoToModel(Race race)
        {
            var currentRace = _raceService.LoadCurrentRace();
            var groups      = new List <Model.Group>();


            if (currentRace?.Groups != null)
            {
                groups = currentRace.Groups.ToList();
            }

            return(new Model.Race {
                Date = race.Date,
                RaceType = race.RaceType,
                Titel = race.Titel,
                StartTime = race.StartTime,
                Place = race.Place,
                Judge = race.Judge,
                TimingTool = race.TimingTool,
                Groups = groups,
            });
        }
Exemplo n.º 2
0
        public void UpdateRace([FromBody] Race race)
        {
            var currentRace = ConvertDtoToModel(race);

            _raceService.UpdateRace(currentRace);
        }