public void Delete(int id)
        {
            var token = MyEventsToken.GetTokenFromHeader();

            ValidateEventAuthorization(id);

            _eventDefinitionRepository.Delete(id);
        }
Exemplo n.º 2
0
        public ActionResult Delete(MyEventsIdentity identity, int eventDefinitionId)
        {
            EventDefinition eventDefinition = _eventsRepository.GetById(eventDefinitionId);

            _authorizationService.ValidateEventAuthorization(identity, eventDefinition);

            _eventsRepository.Delete(eventDefinitionId);
            return(RedirectToAction("Index", "Home"));
        }
Exemplo n.º 3
0
 public void Delete(string eventDefinitionID)
 {
     _awardConditionRepository.DeleteConditionsByEventDefinitionID(eventDefinitionID);
     _eventDefinitionRepository.Delete(eventDefinitionID);
 }
        public async Task Delete(string eventDefinitionID)
        {
            await _awardConditionRepository.DeleteConditionsByEventDefinitionID(eventDefinitionID);

            _eventDefinitionRepository.Delete(eventDefinitionID);
        }