Example #1
0
        public async Task DeleteAsync(KeyCredential credential)
        {
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            await _store.DeleteAsync(credential);
        }
        public async Task DeleteAsync(KeyCredential credential, CancellationToken cancellationToken = default)
        {
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            _context.KeyCredentials.Remove(credential);
            await _context.SaveChangesAsync(cancellationToken);
        }
Example #3
0
        public async Task CreateAsync(KeyCredential credential)
        {
            if (credential == null)
            {
                throw new ArgumentNullException(nameof(credential));
            }

            credential.NormalizedTenantName = Normalize(credential.TenantName);
            await _store.CreateAsync(credential);
        }
        public async Task CreateAsync(KeyCredential credential, CancellationToken cancellationToken = default)
        {
            await _context.KeyCredentials.AddAsync(credential, cancellationToken);

            await _context.SaveChangesAsync(cancellationToken);
        }