Closed lyquocnam closed 8 years ago
RunAsync returns an IAsyncEnumerator (https://github.com/mfenniak/rethinkdb-net/blob/master/rethinkdb-net/Interfaces/IAsyncEnumerator.cs). It's like an IEnumerator, but with an async MoveNext function. So you would then 'await enumerator.MoveNext();' and access .Current.
Here's an example in our test code of reading from the async enumerator: https://github.com/mfenniak/rethinkdb-net/blob/290eeb6da3c25b19d297b7b7671db998139f97b4/rethinkdb-net-test/Integration/MultiTableTests.cs#L82
i try this code to load data with async method but not work
await conn.RunAsync(Person.Table);
error: IAsyncEnumerator' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'IAsyncEnumerator' could be found (are you missing a using directive or an assembly reference?
conn.RunAsync(Person.Table); not have awaiter ?
this work ok !
conn.Run(Person.Table);