public async Task DeleteRewardAsync(int id) { if (!await _rewardRepository.ExistsAsync(id)) { throw new NotFoundException($"Reward with ID {id} not found."); } await _rewardRepository.DeleteByIdAsync(id); }
public async Task DeleteRewardAsync(int id) { if (!await _rewardRepository.ExistsAsync(id)) { throw new NotFoundException($"Reward with ID {id} not found."); } await _rewardRepository.DeleteByIdAsync(id); }