0

I'm doing some more working with AJAX, and JSON calls, and I've noticed the the SqlCommand Object has a two methods, ExecuteNonQuery(), and ExecuteNonQueryAsync(), what exactly are the differences in these methods?

user2592731
  • 1
  • 1
  • 2

1 Answers1

2

If you call ExecuteNonQuery your code will wait until it completes. If you call ExecuteNonQueryAsync your code will continue execution and you can track when the actual call to ExecuteNonQueryAsync completes via Task<int> object that it returns.