Пример #1
0
    public async Task <ClaimTypeInfo> GetAsync(Guid id)
    {
        if (id == Guid.Empty)
        {
            throw new InvalidOperationException(nameof(id));
        }

        var entity = await _repository.GetByIdAsync(id);

        return(entity != null?ToInfo(entity) : null);
    }
Пример #2
0
        public async Task <ClaimTypeInfo> GetAsync(Guid id)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            var entity = await _repository.GetByIdAsync(id);

            return(entity != null?ToInfo(entity) : null);
        }