Exemple #1
0
 public async Task <IActionResult> AddAttendeeForATalk([FromBody] TalkViewModel model)
 {
     try
     {
         if (model.TalkID > 0)
         {
             await _talkService.AddAttendeeForATalk(model);
         }
         else
         {
             return(BadRequest(new ApiResponse {
                 Status = false, Message = "Attendee list is empty"
             }));
         }
     }
     catch (Exception ex)
     {
         _logger.LogError(ex.Message, $"Failed to add Attendee for a Talk: {DateTime.UtcNow.ToString("yyyy-MM-dd HH:mm:ss.fff")}");
     }
     _logger.LogInformation("An Attendee was successfully added for a Talk");
     return(NoContent());
 }