ResourceStore.FindApiScopesByNameAsync would throw a NotSupportedException, because a Select(x => x.ToModel()) is executed on MongoDB's IQueryable implementation, while ToModel is not a queryable part of the given Entity, but an external extension method.
This fix changes this behaviour by collecting the query result into an array and then performing the Select just like the other query methods do with their queries.
ResourceStore.FindApiScopesByNameAsync
would throw aNotSupportedException
, because aSelect(x => x.ToModel())
is executed on MongoDB's IQueryable implementation, whileToModel
is not a queryable part of the given Entity, but an external extension method.This fix changes this behaviour by collecting the query result into an array and then performing the
Select
just like the other query methods do with their queries.