public async Task <IActionResult> UpdateAccidentAsync([FromRoute] string accidentId, [FromBody] AccidentDto accidentDto)
        {
            if (accidentDto == null)
            {
                return(BadRequest());
            }

            await this.accidentService
            .UpdateAccidentAsync(accidentDto.ToModel())
            .ConfigureAwait(false);

            return(Ok());
        }
        public async Task <IActionResult> CreateAccidentAsync([FromBody] AccidentDto accidentDto)
        {
            if (accidentDto == null)
            {
                return(BadRequest());
            }

            Accident accident = await this.accidentService
                                .CreateAccidentAsync(accidentDto.ToModel())
                                .ConfigureAwait(false);

            if (accident == null)
            {
                return(BadRequest());
            }

            return(Ok(AccidentDto.From(accident)));
        }