- 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();
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/090820135065.html
来源: http://www.codesnippet.cn/detail/090820135065.html