Skip to content

State of Db.Connection #1347

Answered by acentrella13
acentrella13 asked this question in Q&A
Jul 19, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

I went with this..

            using (var connection = new MySqlConnection(sConnectionString))
            {
                await connection.OpenAsync();
                using var cmd = connection.CreateCommand();
                cmd.CommandText = "SELECT * from customers where recdate = curdate()";

                var asyncreply = await GetCustomersAsync(await cmd.ExecuteReaderAsync());
                return asyncreply;
            }

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@bgrainger
Comment options

@acentrella13
Comment options

@acentrella13
Comment options

Answer selected by bgrainger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants