Example #1
0
        public async Task InsertUser(User user)
        {
            if (user == null)
            {
                throw new ArgumentNullException(nameof(user));
            }

            await _userRepository.Create(user);

            _cacheEvent.Publish(user, ChangeType.Insert);
        }
Example #2
0
        public async Task InsertDevice(Device device)
        {
            if (device == null)
            {
                throw new ArgumentNullException(nameof(device));
            }

            await _deviceRepository.Create(device);

            _cacheEvent.Publish(device, ChangeType.Insert);
        }