Enum NullsPosition
Where SQL NULL values are placed in an ORDER BY key relative to non-null values.
public enum NullsPosition
- Extension Methods
Fields
Default = 0The provider's default NULL ordering; no clause is emitted.
First = 1SQL
NULLvalues sort before every non-null value, regardless of direction.Last = 2SQL
NULLvalues sort after every non-null value, regardless of direction.
Remarks
Default asks for the provider's own NULL ordering and emits no clause, so it keeps the
provider default. First and Last request an explicit placement: providers
with native support render NULLS FIRST/NULLS LAST, while providers without it emulate the
placement with a CASE prefix. Placement is independent of OrderDirection: it never
flips when the direction flips, and reversing a query's order swaps First and
Last so the reversed order stays logically equivalent.