ResultCardinality Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Entity Framework