示例#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());
 }
示例#2
0
        public IHttpActionResult Delete()
        {
            // Validate that we can delete
            _dataChangeValidator.ThrowExceptionIfAnyErrors(_dataChangeValidator.ValidateChange <Universe>(ChangeActions.Delete, ChangeTargets.AllItems, null));

            _universeRepository.Truncate();
            return(Ok());
        }
示例#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());
        }
示例#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());
        }
示例#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());
        }