Esempio n. 1
0
 public IHttpActionResult DeleteAll()
 {
     // Validate that we can delete
     _dataChangeValidator.ThrowExceptionIfAnyErrors(_dataChangeValidator.ValidateChange <Demographic>(ChangeActions.Delete, ChangeTargets.AllItems, null));
     //delete
     _demographicRepository.Truncate();
     return(Ok());
 }
Esempio n. 2
0
        public IHttpActionResult Delete()
        {
            // Validate that we can delete
            _dataChangeValidator.ThrowExceptionIfAnyErrors(_dataChangeValidator.ValidateChange <Universe>(ChangeActions.Delete, ChangeTargets.AllItems, null));

            _universeRepository.Truncate();
            return(Ok());
        }
Esempio n. 3
0
        public async Task <IHttpActionResult> DeleteAsync()
        {
            // Validate that we can delete
            _dataChangeValidator.ThrowExceptionIfAnyErrors(
                _dataChangeValidator.ValidateChange <Campaign>(
                    ChangeActions.Delete,
                    ChangeTargets.AllItems,
                    null
                    ));

            await _campaignCleaner.ExecuteAsync().ConfigureAwait(false);

            return(this.NoContent());
        }
Esempio n. 4
0
        public async Task <IHttpActionResult> DeleteAll()
        {
            //Validate that we can delete(is run scheduled or active)
            _dataChangeValidator.ThrowExceptionIfAnyErrors(
                _dataChangeValidator.ValidateChange <Sponsorship>(
                    ChangeActions.Delete,
                    ChangeTargets.AllItems,
                    null
                    ));

            await _sponsorshipRepository.TruncateAsync().ConfigureAwait(false);

            return(Ok());
        }
Esempio n. 5
0
        public async Task <IHttpActionResult> DeleteAsync()
        {
            // Validate that we can delete
            _dataChangeValidator.ThrowExceptionIfAnyErrors(
                _dataChangeValidator.ValidateChange <Product>(
                    ChangeActions.Delete,
                    ChangeTargets.AllItems,
                    null
                    ));

            await _repository.TruncateAsync();

            return(Ok());
        }