public async Task <IActionResult> AddPageToModuleAsync( [FromRoute] int moduleId, [FromBody] AddModulePageMappingRequestDto addModulePageMappingRequestDto, CancellationToken token = default) { try { var modulePageMappingServiceObject = Mapper.Map <ModulePageMappingServiceObject>(addModulePageMappingRequestDto); modulePageMappingServiceObject.ModuleId = moduleId; await _modulesService.AddPageToModuleAsync(modulePageMappingServiceObject, token); return(new StatusCodeResult(204)); } catch (Exception) { return(new BadRequestResult()); } }