Example #1
0
        public async Task <IActionResult> GetAttendees()
        {
            var attendeeDTos = await _attendeeService.GetAttendeesAsync();

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