Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A product can indicate how a meta-class should be sorted by default as follows (assuming the code is inside buildera builder. See Builder API).

The example below sets the standard sorting for a person.

Code Block
Elements.PersonBuilder.DefaultSort("LastName");
Elements.PersonBuilder.DefaultSort("FirstName");

The example above is already optimal, but let's examine below how we could write it using a query aspect.

Code Block
Elements.PersonBuilder.Filter(
    q => q.OrderBy("LastName").OrderBy("FirstName")
  )
);

The example above is trivial, but the aspect can include any query elements it wantsany query elements it wants (see Query API).

The following base classes should suffice for most purposes:

...