Beispiel #1
0
        public async Task <IActionResult> AddFacultyToEnrolleeAsync([FromBody] FacultyEnrolleeAddModel facultyEnrolleeModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            var facultyEnrolleeCreateDto = _mapper.Map <FacultyEnrolleeCreateDto>(facultyEnrolleeModel);
            var statusCode = await _enrolleeService.AddFacultyEnrolleeAsync(facultyEnrolleeCreateDto);

            var response = _enrolleeResponseComposer.ComposeForDecouplingTable(statusCode);

            return(response);
        }