.Select<T>()
Selects all records in a table, or a specific record, from the database.
Method Syntaxawait db.Select<T>(resource)
Arguments | Description | ||
---|---|---|---|
thing required | The table name or a | ||
cancellationToken optional | The cancellationToken enables graceful cancellation of asynchronous operations. |
// Select all records from a table var people = await db.Select<Person>("person"); // Select a specific record from a table var person = await db.Select<Person>(("person", "h5wxrf2ewk8xjxosxtyc")); var person = await db.Select<Person>(new StringRecordId("person:h5wxrf2ewk8xjxosxtyc")); // Select a specific record from a table, given a non-string id var person = await db.Select<Person>(("person", new Guid("8424486b-85b3-4448-ac8d-5d51083391c7")));