ResultCardinality Enum

Definition

An enum that represents the cardinality of query result.

This enum is typically used by database providers (and other extensions). It is generally not used in application code.

public enum ResultCardinality
type ResultCardinality = 
Public Enum ResultCardinality
Inheritance
ResultCardinality

Fields

Name Value Description
Enumerable 0

Indicates that the query returns multiple results.

Single 1

Indicates that the query returns a single result. Throws if there is no result or more than one result.

SingleOrDefault 2

Indicates that the query returns a single or default result. Throws if there is more than one result.

Remarks

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Applies to