public async Task <bool> ClearGroupForLogsAsync(int departmentGroupId, CancellationToken cancellationToken = default(CancellationToken)) { var logs = await _logsRepository.GetLogsForGroupAsync(departmentGroupId); if (logs != null && logs.Any()) { foreach (var log in logs) { log.StationGroupId = null; log.StationGroup = null; await _logsRepository.SaveOrUpdateAsync(log, cancellationToken); } return(true); } return(false); }