예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public void Update(CustomFormat customFormat)
 {
     _formatRepository.Update(customFormat);
     _cache.Clear();
 }