public void Save() { if (_settings != default(IList <Setting>) && _settings.Any()) { SettingRepository.UpdateMany(_settings); } if (_buildStatuses != default(IDictionary <BuildStatusType, BuildStatus>) && _buildStatuses.Any()) { BuildStatusRepository.UpdateMany(_buildStatuses.Values.ToList()); } }
private void InitialiseBuildStatuses() { // retrieve the build status configurations from the repository var buildStatuses = BuildStatusRepository.All(); if (buildStatuses == default(IList <BuildStatus>) || !buildStatuses.Any()) { return; } _buildStatuses = new Dictionary <BuildStatusType, BuildStatus>(buildStatuses.Count); buildStatuses.ToList().ForEach(x => _buildStatuses.Add(x.BuildStatusType, x)); }