Reputation: 23921
I have VB code that calls a complex stored procedure via linq-to-sql. Will the VB code wait for the SP to finish before continuing? Or will it just make a call to the server to execute the SP (and then proceed regardless of how long it takes the SP to execute)?
Line 1 Do something
Line 2 myLinqToSQLDb.doStoredProcedure //will the code wait for this to finish before doing line 3?
Line 3 Do something else
Upvotes: 0
Views: 349
Reputation: 164341
It will process the lines in sequence, waiting for operations to complete, unless you use any of the asynchronous APIs.
If you don't know whether your API is asynchronous, it is probably not. It would be named BeginFoo and return IAsyncResult, or perhaps returning a Task and using Async / Await from the newest VB version).
Upvotes: 5