Пример #1
0
        public Task <TRole> FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken = new CancellationToken())
        {
            cancellationToken.ThrowIfCancellationRequested();

            if (normalizedRoleName == null)
            {
                throw new ArgumentNullException(nameof(normalizedRoleName));
            }

            return(Task.FromResult(_dbStore.Query <TRole>().Single(x => x.NormalizedName == normalizedRoleName)));
        }
Пример #2
0
 public IQueryable <T> Query <T>() where T : IEntity
 {
     return(_dbStore.Query <T>());
 }