예제 #1
0
        public async Task <IActionResult> GetAttendeesByTalk(int talkID)
        {
            var talkDTo = await _attendeeService.GetAttendeesByTalkAsync(talkID);

            try
            {
                if (talkDTo == null)
                {
                    return(NotFound(new ApiResponse {
                        Status = false, Message = "Not Found"
                    }));
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex.Message, $"Failed to pull request for Attendees per talkID '{talkID}': {DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
            }
            _logger.LogInformation("Successfully pulled request for talks");
            return(Ok(new ApiResponse {
                Status = true, Message = "Successful", Result = talkDTo
            }));
        }