更新时间:2022-11-23 12:53:30
有被称为一个动作筛选器属性ResultLimitAttribute$c$c>你可以在它返回任何操作方法使用的IQueryable< T>
甚至的IEnumerable< T>
来限制数量数据返回。
There's an action filter attribute called ResultLimitAttribute
which you can use on any action method which returns IQueryable<T>
or even IEnumerable<T>
to limit the amount of data returned.
[ResultLimit(100)]
public IQueryable<Product> Get() {
// ...
}