Typed request with Skip, Take, etc

Is it possible to make a typed AutoQuery request by making the request DTO inherit from some certain type?

If I make an autoquery of a model, say my News model it looks something like this:

public class FindNews : QueryBase<News, NewsResponse>
{
  public Guid CompanyId { get; set; }
}

I can then query it using urls like: ?Skip=10&take=2&MyFieldStartWith=Something&CompanyId=1.

Is it possible to somehow get close to the above query with a typed request dto? Atleast for the Skip and Take? Is there some “base autoquery request fields”.

I don’t understand the question, Skip, Take is already properties in QueryBase<T> and you can also formalize your Request DTO with explicit conventions as much as you wish:

public class FindNews : QueryBase<News, NewsResponse>
{
    public int? CompanyId { get; set; }
    public string MyFieldStartWith { get; set; }
}

Also not sure if you’re aware of this, the GetLazy API’s on Service Clients will stream paged AutoQuery requests where it transparently perform multiple requests using the Skip/Take params to provide a continuous stream of results behind a lazy IEnumerable<T> stream.

You are completely right, I have been blind, I was checking the wrong type. Skip, take etc is there right in front of me. Good tip with the stream loading!

Thank you and good night! :slight_smile: