public IAsyncEnumerable <AuthenticationTicketIdentityViewModel> AsyncEnumerateIdentities(
            Optional <bool> isDeleted = default)
        {
            AuthenticationLogMessages.IdentitiesEnumerating(_logger, isDeleted);

            var query = _context.Set <AuthenticationTicketEntity>()
                        .AsQueryable();

            RepositoryLogMessages.QueryInitializing(_logger, query);

            if (isDeleted.IsSpecified)
            {
                RepositoryLogMessages.QueryAddingWhereClause(_logger, nameof(isDeleted));
                query = isDeleted.Value
                    ? query.Where(x => x.DeletionId != null)
                    : query.Where(x => x.DeletionId == null);
            }

            RepositoryLogMessages.QueryTerminating(_logger);
            var result = query
                         .Select(AuthenticationTicketIdentityViewModel.FromEntityProjection)
                         .AsAsyncEnumerable();

            RepositoryLogMessages.QueryBuilt(_logger);
            return(result);
        }
        public async Task <long> CreateAsync(
            ulong userId,
            long actionId,
            CancellationToken cancellationToken)
        {
            AuthenticationLogMessages.AuthenticationTicketCreating(_logger, userId, actionId);

            var ticket = new AuthenticationTicketEntity(
                id:         default,