Esempio n. 1
0
 public IActionResult SendAll(MessageConsoleViewModel messageConsoleViewModel)
 {
     if (ModelState.IsValid)
     {
         var eventId     = messageConsoleViewModel.EventId;
         var messageBody = messageConsoleViewModel.MessageBody;
         var volunteers  = _volunteerService.GetVolunteersForEvent(eventId);
         _messageSenderService.SendNewMessage(messageBody, volunteers);
     }
     return(Redirect($"~/messageconsole/{messageConsoleViewModel.EventId}"));
 }