public static Participants Map(ParicipantModel paricipantModel)
 {
     return(new Participants
     {
         Id = paricipantModel.Id,
         EventId = paricipantModel.Id,
         Email = paricipantModel.Email
     });
 }
 public ActionResult Remove(ParicipantModel participantModel)
 {
     try
     {
         _participantService.Remove(participantModel);
         return(Json(new { success = true }));
     }
     catch (Exception)
     {
         return(Json(new { message = Localization.Localization.ErrorGeneralException, success = false }));
     }
 }
        public ActionResult Add(ParicipantModel paricipantModel)
        {
            if (!ModelState.IsValid)
            {
                return(Json(new { message = Localization.Localization.ErrorModelValidation, success = true }));
            }
            try
            {
                _participantService.Add(paricipantModel);
            }
            catch (ParticipantAlreadyRegisteredException)
            {
                return(Json(new { message = Localization.Localization.ErrorEventAlreadyEnrolledPlaceholder, success = false }));
            }
            catch (ParticipantCountReachedMaximumRoomCapacityException)
            {
                return(Json(new { message = Localization.Localization.ErrorEventParticipantReachedMaximumPlaceholder, success = false }));
            }

            return(Json(new { message = Localization.Localization.InfoParticipantAddedSuccess, success = true }));
        }