public IHttpActionResult DeleteAll() { // Validate that we can delete _dataChangeValidator.ThrowExceptionIfAnyErrors(_dataChangeValidator.ValidateChange <Demographic>(ChangeActions.Delete, ChangeTargets.AllItems, null)); //delete _demographicRepository.Truncate(); return(Ok()); }
public IHttpActionResult Delete() { // Validate that we can delete _dataChangeValidator.ThrowExceptionIfAnyErrors(_dataChangeValidator.ValidateChange <Universe>(ChangeActions.Delete, ChangeTargets.AllItems, null)); _universeRepository.Truncate(); return(Ok()); }
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()); }
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()); }
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()); }