public async Task <IActionResult> DeleteAllPodcasts() { try { _repository.GetContext().Podcasts.RemoveRange( _repository.GetContext().Podcasts.ToList() ); await _unitOfWork.CompleteAsync(); return(Ok()); } catch (Exception ex) { _logger.LogError("Error deleting podcasts"); _logger.LogError(ex.Message); } return(BadRequest("Unable to delete podcasts")); }