Skip to content
Discussion options

You must be logged in to vote

Keep the whole call chain asynchronous: the caller awaits IDataPortal<T>.FetchAsync, the attributed [Fetch] method returns async Task and awaits the DAL, and the DAL awaits OpenConnectionAsync, ExecuteReaderAsync and each ReadAsync.

Here is a complete console example with CSLA 10.2.0 and Npgsql 10.0.3. It returns a populated read-only CSLA list, preserves database nulls, and opens a separate connection per operation from a shared data source. Its runnable PostgreSQL checks cover delayed query completion, zero/one/multiple rows, provider errors and a successful later fetch. They also exercise the DAL directly, since the local console portal's internal scheduling alone does not establish as…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rockfordlhotka
Comment options

Answer selected by Chicagoan2016
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants