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))); }
public IQueryable <T> Query <T>() where T : IEntity { return(_dbStore.Query <T>()); }