public ActionResult DeleteConfirmed(int id)
        {
            Participant participant = participantService.GetById(id);

            participantService.Delete(participant);
            return(RedirectToAction("Details", "Teams", new { id = participant.TeamId }));
        }
Beispiel #2
0
 public IHttpActionResult Delete(string id)
 {
     // delete participant
     try
     {
         _service.Delete(id);
         return(Ok());
     }
     catch (Exception ex)
     {
         HandleServerError(ex);
         return(InternalServerError());
     }
 }
Beispiel #3
0
        private void Delete(ParticipantBaseModel participantBaseModel)
        {
            ParticipantBaseDTO participantBaseDTO = Mapper.Map <ParticipantBaseModel, ParticipantBaseDTO>(participantBaseModel);

            using (IParticipantService service = factory.CreateParticipantService())
            {
                ServiceMessage serviceMessage = service.Delete(participantBaseDTO);
                RaiseReceivedMessageEvent(serviceMessage);

                if (serviceMessage.IsSuccessful)
                {
                    Notify();
                }
            }
        }