Example #1
0
        public bool HasActiveDelegation(long sourceUserId, long targetUserId)
        {
            var activeUserDelegationExpression = new ActiveUserDelegationSpecification(sourceUserId, targetUserId)
                                                 .ToExpression();

            var activeDelegation = _userDelegationRepository.FirstOrDefault(activeUserDelegationExpression);

            return(activeDelegation != null);
        }
Example #2
0
        public async Task <bool> HasActiveDelegationAsync(long sourceUserId, long targetUserId)
        {
            var activeUserDelegationExpression = new ActiveUserDelegationSpecification(sourceUserId, targetUserId)
                                                 .ToExpression();

            var activeDelegation = await _userDelegationRepository.FirstOrDefaultAsync(activeUserDelegationExpression);

            return(activeDelegation != null);
        }