예제 #1
0
        public async Task <IActionResult> AddAtheleteToTest([FromBody] TestDetail testDetail)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            if (!await _testRepository.IsTestExistAsync(testDetail.TestId))
            {
                return(NotFound());
            }

            await _testRepository.AddAtheleteToTestAsync(testDetail);

            return(Ok(testDetail));
        }