EntitySqlHelper.GetSingle method
Gets the single entity returned by executing the query. The values are loaded into the loader row of the query.
public static bool GetSingle(this SqlQuery query, IDbConnection connection,
IReadOnlyDictionary<string, object?>? parameters = null)
| parameter | description |
|---|---|
| query | The query. |
| connection | The connection. |
| parameters | Values that override the query's parameters for this execution. |
Return Value
True if any results were returned from the data reader.
Exceptions
| exception | condition |
|---|---|
| InvalidOperationException | Query returned more than one result! |
See Also
- class SqlQuery
- class EntitySqlHelper