diff --git a/src/Attributes/EnableQueryAttribute.cs b/src/Attributes/EnableQueryAttribute.cs index c54afe9..d194792 100644 --- a/src/Attributes/EnableQueryAttribute.cs +++ b/src/Attributes/EnableQueryAttribute.cs @@ -106,7 +106,9 @@ public void OnActionExecuted(ActionExecutedContext context) var (data, totalCount) = content.Apply(query, _topMax, searchBinder); result.StatusCode = StatusCodes.Status200OK; - result.Value = new PagedResponse((IQueryable)data, totalCount); + // We use here because when utilizing the 'select' functionality, it becomes + // an anonymous object and no longer is the type T. + result.Value = new PagedResponse((IQueryable)data, totalCount); } catch (Exception ex) {