Beispiel #1
0
        public async Task <Unit> SaveUnitAsync(Unit unit, CancellationToken cancellationToken = default(CancellationToken))
        {
            var saved = await _unitsRepository.SaveOrUpdateAsync(unit, cancellationToken);

            _eventAggregator.SendMessage <DepartmentSettingsUpdateEvent>(new DepartmentSettingsUpdateEvent()
            {
                DepartmentId = saved.DepartmentId
            });

            return(saved);
        }