connect asynchronously to sql server

readonly string ConnectionString = "Data Source=database_server_name;Initial Catalog=Store;Integrated Security=True";
        protected async void ExecuteCommandAsync()
        {
 
            using (SqlConnection con = new SqlConnection(ConnectionString))
            {
                await con.OpenAsync();
            }
        }

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.