public CustomFormat Insert(CustomFormat customFormat) { // Add to DB then insert into profiles var result = _formatRepository.Insert(customFormat); _cache.Clear(); _eventAggregator.PublishEvent(new CustomFormatAddedEvent(result)); return(result); }
public CustomFormat Insert(CustomFormat customFormat) { var ret = _formatRepository.Insert(customFormat); try { ProfileService.AddCustomFormat(ret); } catch (Exception e) { _logger.Error("Failure while trying to add the new custom format to all profiles.", e); _formatRepository.Delete(ret); throw; } _cache.Clear(); return(ret); }
public void Update(CustomFormat customFormat) { _formatRepository.Update(customFormat); _cache.Clear(); }